Added style without -s and -d

This commit is contained in:
Jeroen De Meerleer 2018-11-30 11:27:32 +01:00
parent ad75ff4e28
commit 594d6fb157
1 changed files with 8 additions and 1 deletions

View File

@ -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 <source> -d|--dest <destination> <parameters>"
echo "music-sync <options> -s|--source <source> -d|--dest <destination>"
echo "music-sync <options> <source> <destination>"
echo ""
echo "Syncronises music from one folder to another."
echo ""
@ -92,4 +98,5 @@ VerboseOutput() {
GetOptions $@
if [[ "$help" == true ]]; then
Usage
exit
fi