Added style without -s and -d
This commit is contained in:
parent
ad75ff4e28
commit
594d6fb157
@ -18,6 +18,10 @@ GetOptions() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Parsing style without -s or -d
|
||||||
|
source=${*: -2:1}
|
||||||
|
dest=${*: -1:1}
|
||||||
|
|
||||||
OPTIONS=s:d:vh
|
OPTIONS=s:d:vh
|
||||||
LONGOPTS=source:,dest:,verbose,help
|
LONGOPTS=source:,dest:,verbose,help
|
||||||
|
|
||||||
@ -70,8 +74,10 @@ GetOptions() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Usage() {
|
Usage() {
|
||||||
|
echo ""
|
||||||
echo "Usage:"
|
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 ""
|
||||||
echo "Syncronises music from one folder to another."
|
echo "Syncronises music from one folder to another."
|
||||||
echo ""
|
echo ""
|
||||||
@ -92,4 +98,5 @@ VerboseOutput() {
|
|||||||
GetOptions $@
|
GetOptions $@
|
||||||
if [[ "$help" == true ]]; then
|
if [[ "$help" == true ]]; then
|
||||||
Usage
|
Usage
|
||||||
|
exit
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user