From bcb7ffeaf596ee19df83a112599baf99ffe6809e Mon Sep 17 00:00:00 2001 From: jjacky Date: Fri, 23 Nov 2012 10:42:02 +0100 Subject: [PATCH] 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. --- install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install.sh b/install.sh index 7552004..f275496 100755 --- a/install.sh +++ b/install.sh @@ -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