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