From ad75ff4e281d6a08141b2168b1d9356e43f5d78c Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Fri, 30 Nov 2018 11:05:31 +0100 Subject: [PATCH] Cleanup --- music-sync.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/music-sync.sh b/music-sync.sh index 8e01bfb..4e5f15c 100755 --- a/music-sync.sh +++ b/music-sync.sh @@ -29,7 +29,6 @@ GetOptions() { if [[ ${PIPESTATUS[0]} -ne 0 ]]; then # e.g. return value is 1 # then getopt has complained about wrong arguments to stdout - help=true Usage exit 2 fi @@ -47,7 +46,6 @@ GetOptions() { ;; -h|--help) help=true - echo "test" shift ;; -s|--source) @@ -82,15 +80,16 @@ Usage() { echo " -d, --dest The destionation folder of the music" echo " -v, --verbose Enable verbose output" echo " -h, --help Display this help text" + echo "" } VerboseOutput() { - if [[ $verbose ]]; then + if [[ "$verbose" = true ]]; then echo "[$1] $2" >&2 fi } GetOptions $@ -if [[ $help ]]; then +if [[ "$help" == true ]]; then Usage fi