Fixed cli argument... hopefully

This commit is contained in:
TuDatTr
2020-05-24 03:34:01 +02:00
parent 42a992a8c4
commit ed5168f596

View File

@@ -16,39 +16,39 @@ if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
fi
eval set -- "$PARSED"
d="CHANGEME" # Device that shoud be partitioned e.g. "/dev/sda"
t="CHANGEME" # Your timezone according to /usr/share/zoneinfo/ e.g. "/usr/share/zoneinfo/Europ/Berlin"
l="CHANGEME" # Your locale according to /etc/locale.gen e.g. "en_US.UTF-8 UTF-8"
h="CHANGEME" # Name for your machine e.g. "ArchLinux"
u="CHANGEME" # Your username e.g. "foo"
s="CHANGEME" # Name of the sudogrp
device="CHANGEME" # Device that shoud be partitioned e.g. "/dev/sda"
timezone="CHANGEME" # Your timezone according to /usr/share/zoneinfo/ e.g. "/usr/share/zoneinfo/Europ/Berlin"
locale="CHANGEME" # Your locale according to /etc/locale.gen e.g. "en_US.UTF-8 UTF-8"
hostname="CHANGEME" # Name for your machine e.g. "ArchLinux"
username="CHANGEME" # Your username e.g. "foo"
sudogrp="CHANGEME" # Name of the sudogrp
CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
while true; do
case "$1" in
-d|--device)
d="$2"
device="$2"
shift 2
;;
-t|--timezone)
t="$2"
timezone="$2"
shift 2
;;
-l|--locale)
l="$2"
locale="$2"
shift 2
;;
-h|--hostname)
h="$2"
hostname="$2"
shift 2
;;
-u|--username)
u="$2"
username="$2"
shift 2
;;
-s|--sudogrp)
s="$2"
sudogrp="$2"
shift 2
;;
--help)
@@ -67,6 +67,9 @@ Mandatory arguments:
"
exit 0
;;
--)
shift
break
*)
echo "Programming error"
exit 3