Showing help if no parameter is given

This commit is contained in:
Jeroen De Meerleer 2018-11-30 14:42:20 +01:00
parent 3cf5414dc0
commit 2ed4a037ff

View File

@ -71,6 +71,9 @@ GetOptions() {
esac esac
done done
if [[ $dest == "" ]] || [[ $source == "" ]]; then
help=true
fi
} }
Usage() { Usage() {
@ -148,7 +151,7 @@ CleanUp() {
} }
GetOptions $@ GetOptions $@
if [[ "$help" == true ]]; then if [[ $help == true ]]; then
Usage Usage
exit exit
fi fi