]> xenbits.xensource.com Git - people/larsk/xen-release-scripts.git/commitdiff
Make path option work with absolute paths
authorLars Kurth <lars.kurth@citrix.com>
Thu, 27 Jul 2017 22:36:09 +0000 (23:36 +0100)
committerLars Kurth <lars.kurth@citrix.com>
Thu, 27 Jul 2017 22:36:09 +0000 (23:36 +0100)
README
match-xsa

diff --git a/README b/README
index d2cf3f2d2547bd9810ff960fd08384014c19bbfa..0da9a6cd96dcdd2eee0fb1b537853e771dfae02c 100644 (file)
--- a/README
+++ b/README
@@ -212,8 +212,6 @@ match-xsa
 * The reporting can probably be improved: aka, highlight blocks with
   potential issues better. For example, embed relevant portions of an XSA
   into the output in cases where there is no match
-* --xsadir currently only works when providing an absolute path (the issue
-  was introduced in commit 6d371d6adccc36eeeb5d2acd412ba0f3424a4a15)
 
 xsa.git:Infra/xsa-list-patches
 ------------------------------
index 8dc81f292bea877c521d7baafb8decd92cd20985..9692ea07461ca2c9cfc449df0e40727ce5dd82ba 100755 (executable)
--- a/match-xsa
+++ b/match-xsa
@@ -24,7 +24,7 @@ my $UNTIL="stable";
 my $XSAFILE;
 my $XSADIR;
 my $XSAFETCH;
-my $LOGROOT = File::Spec->canonpath(cwd()."/../xen-release-logs" );
+my $LOGROOT = "../xen-release-logs";
 
 GetOptions(
     'version=s' => \$VERSION,
@@ -61,11 +61,15 @@ my $short="$VERSION$MAJOR$SINCE-$UNTIL";
 # Set up XSADIR and XSAFETCH, if not set
 if (!$XSADIR && $SMART!=0) {
    $XSAFETCH = "https://xenbits.xenproject.org/xsa/";
-   $XSADIR = File::Spec->canonpath(cwd()."/../xsaweb" );
+   $XSADIR = "../xsaweb";
    system("rm -rf $XSADIR");
    mkdir $XSADIR;
 }
-  
+
+# Make relative paths absolute
+$LOGROOT = File::Spec->rel2abs($LOGROOT);
+$XSADIR = File::Spec->rel2abs($XSADIR);
+
 # Directories
 if (! -e $LOGROOT) {
     mkdir $LOGROOT;