diff --git a/music-sync.sh b/music-sync.sh index 4e5f15c..d36dd71 100755 --- a/music-sync.sh +++ b/music-sync.sh @@ -17,6 +17,10 @@ GetOptions() { echo "If you're using mac or another unix-like system, please install GNU getopt" exit 1 fi + + # Parsing style without -s or -d + source=${*: -2:1} + dest=${*: -1:1} OPTIONS=s:d:vh LONGOPTS=source:,dest:,verbose,help @@ -70,8 +74,10 @@ GetOptions() { } Usage() { + echo "" echo "Usage:" - echo "music-sync -s|--source -d|--dest " + echo "music-sync -s|--source -d|--dest " + echo "music-sync " echo "" echo "Syncronises music from one folder to another." echo "" @@ -92,4 +98,5 @@ VerboseOutput() { GetOptions $@ if [[ "$help" == true ]]; then Usage + exit fi