[SCM] grass branch, master, updated. upstream/6.4.1-86-g1dbb5e4
M. Hamish Bowman
hamish_b at yahoo.com
Sun Feb 26 00:10:33 UTC 2012
The following commit has been merged in the master branch:
commit f1c44867f2f7cd572e082b0d63a9d3aedd04cc75
Author: M. Hamish Bowman <hamish_b at yahoo.com>
Date: Sun Feb 26 12:58:07 2012 +1300
simplify using 'sed -i', minor whitespace for readability
diff --git a/debian/fixpaths.sh b/debian/fixpaths.sh
index b794362..d2ae56a 100755
--- a/debian/fixpaths.sh
+++ b/debian/fixpaths.sh
@@ -12,9 +12,6 @@ echo " in $TMPPATH"
for i in `grep -r $ZOTPATH $TMPPATH | cut -d : -f 1 | sort -u` ; do
echo -n "Grr. Zotting $i ... "
- # why not use 'sed -i' here?
- cp $i $i.old
- sed -e s,$ZOTPATH,,g $i.old >$i
- rm -f $i.old
+ sed -i -e "s,$ZOTPATH,,g" "$i"
echo done
done
diff --git a/debian/fixscripts.sh b/debian/fixscripts.sh
index fdb9ce9..4f286bb 100755
--- a/debian/fixscripts.sh
+++ b/debian/fixscripts.sh
@@ -7,25 +7,22 @@ CURDIR=$(pwd)
VERSION=$(echo $(head -2 $CURDIR/include/VERSION)|sed -e 's/ //')
# silence bogus lintian complaint about interpreter-not-absolute
-for x in script_get_line \
+for SCRIPT in script_get_line \
script_play \
script_tools \
script_file_tools \
nviz2.2_script
do
- f=$CURDIR/debian/tmp/usr/lib/grass$VERSION/etc/nviz2.2/scripts/$x
- # why not use 'sed -i' here?
- sed -e "s.!nviz.!/usr/lib/grass$VERSION/bin/nviz." $f >foo && cat foo >$f
+ file="$CURDIR/debian/tmp/usr/lib/grass$VERSION/etc/nviz2.2/scripts/$SCRIPT"
+ sed -i -e "s.!nviz.!/usr/lib/grass$VERSION/bin/nviz." "$file"
done
-for x in panel_label.tcl \
+for SCRIPT in panel_label.tcl \
panel_scale.tcl
do
- f=$CURDIR/debian/tmp/usr/lib/grass$VERSION/etc/nviz2.2/scripts/$x
- # why not use 'sed -i' here?
- sed -e "s%!../glnviz.new/nvwish%!/usr/lib/grass$VERSION/etc/nviz2.2/glnviz/nvwish%" $f >foo && cat foo >$f
+ file="$CURDIR/debian/tmp/usr/lib/grass$VERSION/etc/nviz2.2/scripts/$SCRIPT"
+ sed -i -e "s%!../glnviz.new/nvwish%!/usr/lib/grass$VERSION/etc/nviz2.2/glnviz/nvwish%" "$file"
done
-rm foo
# silence lintian warning script-not-executable
for x in etc/dm/tksys.tcl \
diff --git a/debian/rules b/debian/rules
index db9f02d..1e9cf50 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,8 +9,8 @@
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-VERSION=$(shell echo `head -2 $(CURDIR)/include/VERSION`|sed -e 's/ //')
-ABI=$(shell echo `head -3 $(CURDIR)/include/VERSION`|sed -e 's/ //g' -e 's/RC/-/')
+VERSION=$(shell echo `head -2 $(CURDIR)/include/VERSION` | sed -e 's/ //')
+ABI=$(shell echo `head -3 $(CURDIR)/include/VERSION` | sed -e 's/ //g' -e 's/RC/-/')
BASE_NAME=grass$(VERSION)
PKG_NAME=grass
@@ -73,7 +73,7 @@ endif
--with-freetype-includes=/usr/include/freetype2 \
--with-tcltk-includes=$(TCLINC) \
--with-postgres-includes=$(shell pg_config --includedir) \
- --with-mysql-includes=$(shell mysql_config --include|sed -e 's/-I//') \
+ --with-mysql-includes=$(shell mysql_config --include | sed -e 's/-I//') \
--with-proj-share=/usr/share/proj \
--with-wxwidgets=/usr/bin/wx-config \
--with-python=/usr/bin/python-config \
@@ -222,7 +222,7 @@ install: build
# install x-grass wrapper script
install -m 755 debian/x-grass debian/tmp/usr/bin/x-grass
- ln -fs /usr/lib/$(shell objdump -p /usr/lib/`gdal-config --libs|cut -d' ' -f2|sed -e 's/-l/lib/'`.so|grep SONAME|cut -d' ' -f18) \
+ ln -fs /usr/lib/$(shell objdump -p /usr/lib/`gdal-config --libs | cut -d' ' -f2 | sed -e 's/-l/lib/'`.so | grep SONAME | cut -d' ' -f18) \
debian/tmp/usr/lib/$(BASE_NAME)/lib/libgdal.so
install-indep: build-indep
--
Geographic Resources Analysis Support System
More information about the Pkg-grass-devel
mailing list