Fix --dry-run not defaulting to --auto

Using --dry-run alone wouldn't default to --auto and therefore show different
paths that what would actually be used upon installation.
pull/165/merge
jjacky 12 years ago committed by William Ting
parent 2de05fde9c
commit 1729d686e1

@ -41,6 +41,11 @@ if [[ ${#} == 0 ]]; then
set -- "--auto"
fi
# Only dry-run should also default to --auto
if [[ ${#} == 1 ]] && ([[ $1 = "-n" ]] || [[ $1 = "--dry-run" ]]); then
set -- "-n" "--auto"
fi
# Command line parsing
while true; do
case "$1" in
@ -84,9 +89,6 @@ while true; do
-n|--dry_run)
dry_run=true
shift
if [[ ${#} == 0 ]]; then
set -- "--auto"
fi
;;
-p|--prefix)
if [ $# -gt 1 ]; then

Loading…
Cancel
Save