]> mj.ucw.cz Git - pciutils.git/commitdiff
Updated Release.pm
authorMartin Mares <mj@ucw.cz>
Sat, 19 Feb 2005 14:52:55 +0000 (14:52 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 5 May 2006 12:18:26 +0000 (14:18 +0200)
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-67

maint/release.pm

index bf8afc0706bf86b5923c33bbfd8c4036aaa04726..1e826c052e0ca8c3440908e4a5494e99bab78eb5 100644 (file)
@@ -19,6 +19,8 @@ sub new($$) {
                        '\.(lsm|spec)$' => 'ps',
                        '(^|/)README$' => 's'
                        ],
+               "directories" => [
+                       ],
                "conditions" => {
                        },
                "DATE" => `date '+%Y-%m-%d' | tr -d '\n'`,
@@ -182,6 +184,10 @@ sub GenPackage($) {
                $s->CopyFile($f, $dir, $action);
        }
 
+       foreach my $d (@{$s->{"directories"}}) {
+               `mkdir -p $dir/$d`; die if $?;
+       }
+
        if (-f "$dir/Makefile") {
                print "Cleaning up\n";
                `cd $dir && make distclean >&2`; die if $?;
@@ -245,7 +251,8 @@ sub MakePatch($) {
        } elsif (defined $s->{"OLDVERSION"}) {
                $oldver = $s->{"OLDVERSION"};
        } else {
-               die "MakePatch: Don't know which is the previous version";
+               print "WARNING: No previous version known. No patch generated.\n";
+               return;
        }
        my $pkg0 = $s->{"PACKAGE"} . "-" . $oldver;