The --dest and --name options removed two arguments using shift 2, but then after case-esac there's another shift. This caused the --dest and --name options to consume 3 command-line arguments, instead of 2, leading to broken argument parsing. Fixed this.
Added a check to test if the argument to --dest and --name actually exists.
The
--dest
and--name
options removed two arguments usingshift 2
, but then aftercase-esac
there's anothershift
. This caused the--dest
and--name
options to consume 3 command-line arguments, instead of 2, leading to broken argument parsing. Fixed this.Added a check to test if the argument to
--dest
and--name
actually exists.