diff options
Diffstat (limited to 'lib/subcommands')
-rw-r--r-- | lib/subcommands/var.bash | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/subcommands/var.bash b/lib/subcommands/var.bash index 60bfe81..3e8fc0b 100644 --- a/lib/subcommands/var.bash +++ b/lib/subcommands/var.bash @@ -9,7 +9,16 @@ subcommand() local key local value - # TODO: Handle opts + # Handle opts + while getopts ":p:" opt + do + case "$opt" in + p) export BASHTARD_PLAYBOOK="$OPTARG" ;; + *) emerg "Unused opt '$opt'?" ;; + esac + done + + shift $(( OPTIND - 1 )) key="$1" ; shift value="$1" ; shift |