#840173 Repack scripts don't abort on incorrect invocations

#840173#5
Date:
2016-10-09 08:26:17 UTC
From:
To:
Hi,
running

$ debian/create-icedove-l10n-tarball.sh -v 45.4

I get:

[[ ... using verbose mode ... ]]
DEBUG -> given argument: 45.4
DEBUG -> ARG_COUNT = 1
DEBUG -> Download xpi: ........ off
DEBUG -> Run git-import-orig: . off
DEBUG -> Upstream beta version:
DEBUG -> Debian version: ...... 45.4
DEBUG -> removing language 'en_US'
DEBUG -> creating workspace for extracted upstream sources in '/tmp/tmp.UwIvKfzGXT/icedove-45.4/'
DEBUG -> extracting "$LANG*.jar" in "/tmp/tmp.UwIvKfzGXT/upstream/chrome" into "/tmp/tmp.UwIvKfzGXT/icedove-45.4/$LANG"
ls: cannot access '/tmp/tmp.UwIvKfzGXT/upstream/': No such file or directory
mv: cannot stat 'upstream': No such file or directory
ls: cannot access 'icedove-45.4/icedove-l10n/': No such file or directory
DEBUG -> creating archive: 'icedove_45.4.orig-icedove-l10n.tar.xz' in '/tmp/tmp.UwIvKfzGXT/'
tar: icedove-l10n: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
DEBUG -> moving /tmp/tmp.UwIvKfzGXT/icedove-45.4/icedove_45.4.orig-icedove-l10n.tar.xz to /var/scratch/debian/icedove/icedove/../

Tarball created in:
  -> /var/scratch/sdcard/tmp/icedove/icedove_45.4.orig-icedove-l10n.tar.xz <- (containing 0 languages)
DEBUG -> NOT cleaning up /tmp/tmp.UwIvKfzGXT/
done.

…and no tarball is created.

Please make the script abort on wrong invocations.
Cheers,
 -- Guido