[GRASS-SVN] r49343 -
grass/branches/develbranch_6/scripts/g.extension
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Nov 24 02:26:28 EST 2011
Author: hamish
Date: 2011-11-23 23:26:28 -0800 (Wed, 23 Nov 2011)
New Revision: 49343
Modified:
grass/branches/develbranch_6/scripts/g.extension/g.extension
Log:
add some (unused) code to demonstrate avoinding symlinks; add a warning in case you will overwrite a previously installed edition
Modified: grass/branches/develbranch_6/scripts/g.extension/g.extension
===================================================================
--- grass/branches/develbranch_6/scripts/g.extension/g.extension 2011-11-24 06:54:20 UTC (rev 49342)
+++ grass/branches/develbranch_6/scripts/g.extension/g.extension 2011-11-24 07:26:28 UTC (rev 49343)
@@ -382,6 +382,7 @@
fi
else
if test -f "$MYINST_DIR/$PROGTYPE/$MODULE" ; then
+ g.message -w "Replacing previously built <$MODULE>"
rm -f "$MYINST_DIR/$PROGTYPE/$MODULE"
fi
@@ -404,7 +405,15 @@
if [ "$MYINST_DIR" = "$GRASS_ADDON_PATH1" ] || [ "$MYINST_DIR" = ~/.grass6/addons ] ; then
# symlink into path which is actually in the $PATH
- ln -s "$MYINST_DIR/$PROGTYPE/$MODULE" "$MYINST_DIR/"
+ if [ 1 -eq 1 ] ; then
+ ln -s "$MYINST_DIR/$PROGTYPE/$MODULE" "$MYINST_DIR/"
+ else
+ # TODO: move them out of bin/ and script/ into .., and rmdir bin/ and script/ if they are empty.
+ mv "$MYINST_DIR/$PROGTYPE/$MODULE" "$MYINST_DIR/"
+ if [ `ls -a "$MYINST_DIR/$PROGTYPE" | wc -l` -le 2 ] ; then
+ rmdir "$MYINST_DIR/$PROGTYPE"
+ fi
+ fi
fi
fi
More information about the grass-commit
mailing list