]> xenbits.xensource.com Git - people/larsk/xen-release-scripts.git/commitdiff
Added extra error checks/workflow functionality for --xsadir option
authorLars Kurth <lars.kurth@citrix.com>
Mon, 4 Sep 2017 10:39:38 +0000 (11:39 +0100)
committerLars Kurth <lars.kurth@citrix.com>
Mon, 4 Sep 2017 10:39:38 +0000 (11:39 +0100)
lib/MyOptions.pm

index 5a50ba2cc3cc721f300cbe731515b02c47c189f0..9e2fd923168b7e78309d51a1784a7099471329e3 100755 (executable)
@@ -133,6 +133,11 @@ sub options_matchxsa {
         $opt{'XSADIR'}    = $o{'TMPDIR'}."/xsaweb";
         system("rm -rf ".$opt{'XSADIR'});
         mkdir $o{'TMPDIR'};
+    } elsif (!-d $opt{'XSADIR'}) {
+        die "Usage: $0\n".$u."\n".
+        "       directory ".$opt{'XSADIR'}." does not exist.\n";
+    } else {
+        system("git -C ".$opt{'XSADIR'}." pull --all");
     }
     
     # Check whether files/directories exist