summaryrefslogtreecommitdiffstats
path: root/files/reprepro/snapshots
diff options
context:
space:
mode:
authorCyril Brulebois <cyril@debamax.com>2016-04-05 18:05:40 +0200
committerCyril Brulebois <cyril@debamax.com>2016-04-05 18:05:40 +0200
commitaa5656a6692619d80ef58856ec750d458e4017b5 (patch)
tree238fbec1ab6c7286f9f620b9fc20a1b14a7988ae /files/reprepro/snapshots
parent2a9f97b50b7dbe901db2698ae8edf2cede3e8aa0 (diff)
Exit if archive directory parameter is missing.
Signed-off-by: Cyril Brulebois <cyril@debamax.com>
Diffstat (limited to 'files/reprepro/snapshots')
-rwxr-xr-xfiles/reprepro/snapshots/time_based/tails-delete-expired-apt-snapshots5
1 files changed, 5 insertions, 0 deletions
diff --git a/files/reprepro/snapshots/time_based/tails-delete-expired-apt-snapshots b/files/reprepro/snapshots/time_based/tails-delete-expired-apt-snapshots
index e5b752b..cad3876 100755
--- a/files/reprepro/snapshots/time_based/tails-delete-expired-apt-snapshots
+++ b/files/reprepro/snapshots/time_based/tails-delete-expired-apt-snapshots
@@ -35,6 +35,11 @@ print "\n*** DRY RUN *** running in simulation mode\n\n"
if $dryrun;
my $archive_dir = shift @ARGV;
+if (! defined $archive_dir) {
+ print "E: missing parameter: archive directory\n";
+ usage();
+}
+
if (! -d $archive_dir) {
print "E: specified archive directory ($archive_dir) isn't a directory\n";
usage();