[GRASS-SVN] r67390 - grass-addons/tools/wingrass-packager

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Dec 27 01:02:19 PST 2015


Author: martinl
Date: 2015-12-27 01:02:19 -0800 (Sun, 27 Dec 2015)
New Revision: 67390

Modified:
   grass-addons/tools/wingrass-packager/cronjob.sh
Log:
wingrass: fix cronjob script

Modified: grass-addons/tools/wingrass-packager/cronjob.sh
===================================================================
--- grass-addons/tools/wingrass-packager/cronjob.sh	2015-12-26 22:54:03 UTC (rev 67389)
+++ grass-addons/tools/wingrass-packager/cronjob.sh	2015-12-27 09:02:19 UTC (rev 67390)
@@ -14,14 +14,12 @@
 
 rm_7() {
     for p in x86 x86_64; do
-	cd $p
 	for f in `find $SRC/${p}/grass$1/WinGRASS* -mtime +7`; do
 	    rm -rfv $f
 	done
 	for f in `find $SRC/${p}/grass$1/osgeo4w/grass*.tar.bz2 -mtime +7`; do
 	    rm -rfv $f
 	done
-	cd ..
     done
 }
 
@@ -41,22 +39,24 @@
 }
 
 addons_index() {
-    cd $SRC/grass$1/addons
-    for d in $(find . -mindepth 1 -maxdepth 1 -type d) ; do
-	cd $d/logs
-	if [ -f "summary.html" ] ; then
-	    ln -sf summary.html index.html
+    for p in x86 x86_64; do
+	cd ${SRC}/${p}/grass$1/addons
+	for d in $(find . -mindepth 1 -maxdepth 1 -type d) ; do
+	    cd $d/logs
+	    if [ -f "summary.html" ] ; then
+		ln -sf summary.html index.html
+	    fi
+	    cd ../..
+	done
+
+	if [ "$1" = "70" ] ; then
+        # create symlink to latest version
+            cd ${SRC}/${p}/grass$1/addons
+	    rm latest
+	    last_version=`ls -w1 | sort -r | head -n2 | tail -n1`
+	    ln -sf $last_version latest
 	fi
-	cd ../..
     done
-
-    if [ "$1" = "70" ] ; then
-        # create symlink to latest version
-        cd $SRC/grass$1/addons
-	rm latest
-	last_version=`ls -w1 | sort -r | head -n2 | tail -n1`
-	ln -sf $last_version latest
-    fi
 }
 
 report() {



More information about the grass-commit mailing list