From: Lars Kurth Date: Thu, 27 Jul 2017 22:36:09 +0000 (+0100) Subject: Make path option work with absolute paths X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f690cedff489fde3d4f8c7c10e87e7c52adfc85c;p=people%2Flarsk%2Fxen-release-scripts.git Make path option work with absolute paths --- diff --git a/README b/README index d2cf3f2..0da9a6c 100644 --- 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 ------------------------------ diff --git a/match-xsa b/match-xsa index 8dc81f2..9692ea0 100755 --- 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;