Cleanup
This commit is contained in:
parent
f9e4b61072
commit
ad75ff4e28
@ -29,7 +29,6 @@ GetOptions() {
|
|||||||
if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
|
if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
|
||||||
# e.g. return value is 1
|
# e.g. return value is 1
|
||||||
# then getopt has complained about wrong arguments to stdout
|
# then getopt has complained about wrong arguments to stdout
|
||||||
help=true
|
|
||||||
Usage
|
Usage
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
@ -47,7 +46,6 @@ GetOptions() {
|
|||||||
;;
|
;;
|
||||||
-h|--help)
|
-h|--help)
|
||||||
help=true
|
help=true
|
||||||
echo "test"
|
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-s|--source)
|
-s|--source)
|
||||||
@ -82,15 +80,16 @@ Usage() {
|
|||||||
echo " -d, --dest <destination> The destionation folder of the music"
|
echo " -d, --dest <destination> The destionation folder of the music"
|
||||||
echo " -v, --verbose Enable verbose output"
|
echo " -v, --verbose Enable verbose output"
|
||||||
echo " -h, --help Display this help text"
|
echo " -h, --help Display this help text"
|
||||||
|
echo ""
|
||||||
}
|
}
|
||||||
|
|
||||||
VerboseOutput() {
|
VerboseOutput() {
|
||||||
if [[ $verbose ]]; then
|
if [[ "$verbose" = true ]]; then
|
||||||
echo "[$1] $2" >&2
|
echo "[$1] $2" >&2
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
GetOptions $@
|
GetOptions $@
|
||||||
if [[ $help ]]; then
|
if [[ "$help" == true ]]; then
|
||||||
Usage
|
Usage
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user