Formatting tweaks

This commit is contained in:
raul 2024-11-18 16:31:20 +01:00
parent ab25c2cb44
commit 7c118fd7fc
Signed by: raul
GPG Key ID: C1AA797073F17129
1 changed files with 6 additions and 6 deletions

View File

@ -41,7 +41,8 @@ cutter ()
echo "$1" | cut -d "$DELIM" -f "$2" echo "$1" | cut -d "$DELIM" -f "$2"
} }
turnLowercase() { turnLowercase()
{
echo "$1" | tr "[:upper:]" "[:lower:]" | sed 's/ñ/n/g' echo "$1" | tr "[:upper:]" "[:lower:]" | sed 's/ñ/n/g'
} }
@ -54,7 +55,7 @@ createGroups ()
echo "[+] Adding group $GROUPNAME..." echo "[+] Adding group $GROUPNAME..."
groupadd $GROUPNAME groupadd $GROUPNAME
else else
echo "[+] Adding group $GROUPNAME..." echo "[+] Adding group $GROUPNAME with GID $GID..."
groupadd $GROUPNAME -g $GID groupadd $GROUPNAME -g $GID
fi fi
done <<< "$FILE_CONTENTS" done <<< "$FILE_CONTENTS"
@ -219,6 +220,7 @@ for arg in "$@"
do do
if [[ "$arg" == "-h" || "$arg" == "--help" ]]; then if [[ "$arg" == "-h" || "$arg" == "--help" ]]; then
usage usage
exit
fi fi
if [[ "$arg" == "--dry-run" ]]; then if [[ "$arg" == "--dry-run" ]]; then
DRYRUN=true DRYRUN=true
@ -237,10 +239,6 @@ do
fi fi
done done
if [[ -z "$1" ]]; then
usage
fi
if [[ "$CREATE_GROUPS" == true ]]; then if [[ "$CREATE_GROUPS" == true ]]; then
if [[ "$DRYRUN" == true ]]; then if [[ "$DRYRUN" == true ]]; then
createGroupsDry createGroupsDry
@ -280,3 +278,5 @@ if [[ "$DELETE_USERS" == true ]]; then
fi fi
exit exit
fi fi
usage