diff options
Diffstat (limited to 'lxc-create')
-rwxr-xr-x | lxc-create | 24 |
1 files changed, 8 insertions, 16 deletions
@@ -14,22 +14,14 @@ # Get the list of requested packages. PACKAGES=$(sed 's/,/ /g' <<< $(cut -d' ' -f1 <<< $(awk -F'--packages ' '{print $2}' <<< "$@"))) -POSITIONAL=() -while [[ $# -gt 0 ]] -do -key="$1" - -case $key in - -n) - LXC_NAME="$2" - shift - shift - ;; - *) - POSITIONAL+=("$1") - shift - ;; -esac +while getopts "qt:n:" opt; do + case $opt in + n) + LXC_NAME="$OPTARG" + ;; + *) + ;; + esac done if [ "$PACKAGES" ]; then |