]> granicus.if.org Git - postgis/commitdiff
Added better handling of file paths for msys
authorBborie Park <bkpark at ucdavis.edu>
Wed, 24 Apr 2013 15:54:58 +0000 (15:54 +0000)
committerBborie Park <bkpark at ucdavis.edu>
Wed, 24 Apr 2013 15:54:58 +0000 (15:54 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11323 b70326c6-7e19-0410-871a-916f4a2858ee

raster/test/regress/rt_addband-pre.pl
raster/test/regress/rt_addband-pre.sh
raster/test/regress/rt_bytea-pre.pl
raster/test/regress/rt_bytea-pre.sh

index 8a05dd3a0b0651d3da609beaa902f186632bb543..772877df5c0445230b1c8bea59511062306c5db5 100755 (executable)
@@ -5,6 +5,13 @@ my $REGDIR = abs_path(dirname($0));
 my $RASTERDIR = abs_path($REGDIR . "/../raster/test/regress");
 my $FILERASTER = $RASTERDIR . "/loader/testraster.tif";
 
+# special handling for msys
+if (lc($^O) eq "msys") {
+       $FILERASTER = `cmd //c echo "$FILERASTER"`;
+       $FILERASTER =~ s/^\s+//;
+       $FILERASTER =~ s/\s+$//;
+}
+
 my $sql = <<"END";
 DROP TABLE IF EXISTS raster_outdb_template;
 CREATE TABLE raster_outdb_template AS
index 68770fa6b3f23ee14fa9b1f3afff1848b4dd0364..6102ed058e1cce039afd0676199d8251b0b0989b 100755 (executable)
@@ -4,6 +4,12 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
 
 FILERASTER="$DIR/loader/testraster.tif"
 
+# special handling for msys
+CSYS=`uname -o | tr '[:upper:]' '[:lower:]'`
+if [ "$CSYS" == "msys" ]; then
+       FILERASTER=`cmd //c echo "${FILERASTER}"`
+fi
+
 SQL=" \
 DROP TABLE IF EXISTS raster_outdb_template; \
 CREATE TABLE raster_outdb_template AS \
index 8a05dd3a0b0651d3da609beaa902f186632bb543..772877df5c0445230b1c8bea59511062306c5db5 100755 (executable)
@@ -5,6 +5,13 @@ my $REGDIR = abs_path(dirname($0));
 my $RASTERDIR = abs_path($REGDIR . "/../raster/test/regress");
 my $FILERASTER = $RASTERDIR . "/loader/testraster.tif";
 
+# special handling for msys
+if (lc($^O) eq "msys") {
+       $FILERASTER = `cmd //c echo "$FILERASTER"`;
+       $FILERASTER =~ s/^\s+//;
+       $FILERASTER =~ s/\s+$//;
+}
+
 my $sql = <<"END";
 DROP TABLE IF EXISTS raster_outdb_template;
 CREATE TABLE raster_outdb_template AS
index 68770fa6b3f23ee14fa9b1f3afff1848b4dd0364..6102ed058e1cce039afd0676199d8251b0b0989b 100755 (executable)
@@ -4,6 +4,12 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
 
 FILERASTER="$DIR/loader/testraster.tif"
 
+# special handling for msys
+CSYS=`uname -o | tr '[:upper:]' '[:lower:]'`
+if [ "$CSYS" == "msys" ]; then
+       FILERASTER=`cmd //c echo "${FILERASTER}"`
+fi
+
 SQL=" \
 DROP TABLE IF EXISTS raster_outdb_template; \
 CREATE TABLE raster_outdb_template AS \