Changeset 692


Ignore:
Timestamp:
Mar 16, 2008, 5:52:09 AM (14 years ago)
Author:
price
Message:
Make updte development cycle shorter.

- Remove lock file when fail, so we can run again
- Accept --force to clobber the existing built-updater directory
File:
1 edited

Legend:

Unmodified
Added
Removed
  • locker/update-system/bin/build-update

    r585 r692  
    1212
    1313my $scriptsdev = "";
     14my $force = 0;
    1415
    1516GetOptions(
     
    2021#          "redo-all" => sub {$redodelete = $redoadd = $redoreplace = $redodiff = 1;},
    2122           "dev" => sub {$scriptsdev = "dev";},
     23           "force" => \$force,
    2224                  );
    2325
     
    3436
    3537(-d $proposaldir) or die "Can't find $proposaldir, did you run propose-update?\n";
     38if (-e $outdir) {
     39    if ($force) {
     40        print STDERR "Clobbering $outdir.\n";
     41        `rm -rf '$outdir'`;
     42    } else {
     43        die "Output directory $outdir exists; try --force.\n";
     44    }
     45}
    3646((! -e $outdir) && mkdir($outdir)) or die "mkdir($outdir) failed: $!";
    3747
     
    94104set -e -o noclobber
    95105
    96 die () { echo "$1" >&2; exit 1; }
     106die () { echo "$1" >&2; rm .scripts-security-upd-lock; exit 1; }
    97107
    98108patchdir=$(dirname "$0")
Note: See TracChangeset for help on using the changeset viewer.