This commit is contained in:
Jeroen De Meerleer 2018-11-30 11:05:31 +01:00
parent f9e4b61072
commit ad75ff4e28
1 changed files with 3 additions and 4 deletions

View File

@ -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 <destination> 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