I am trying to write a script to rsync from another server. I want to schedule the script without using any argument. However I would like to have the options to add arguments when run in Foreground. The intent is that the script would rsync new files without deleting files that have been deleted on the source server, but from time to time I can run the script in foreground passing the --delete or --dry-run flag. I created that simple test script:
#!/bin/bash
#argumentDescription=Useful options: --delete --dry-run -v --stats --progress
#argumentDefault=
echo aaaa
echo arguments: $@
echo aaaa
When I run the script in foreground, the box popup with the "useful options" message and an empty arguments text box. If I enter an argument, it works as intended and echo the argument. If I leave the box empty, nothing happens. I don't get any popup page showing that the script gets executed. It runs as expected in background.
I tried removing the "#argumentDefault=" line, and I get the same behavior. Ideas?