summaryrefslogtreecommitdiff
path: root/bin/reevotech/PutPages.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/reevotech/PutPages.sh')
-rwxr-xr-xbin/reevotech/PutPages.sh31
1 files changed, 26 insertions, 5 deletions
diff --git a/bin/reevotech/PutPages.sh b/bin/reevotech/PutPages.sh
index 831a8616..abf6065e 100755
--- a/bin/reevotech/PutPages.sh
+++ b/bin/reevotech/PutPages.sh
@@ -7,13 +7,34 @@ if [ $# -eq 0 ]
exit
fi
+DEPLOY=$1
+cd /srv/reevotech/www/wiki/maintenance/
-cd /srv/reevotech
+update_ns () {
+ echo ""
+ echo "########### Updating pages in $1"
+ php importTextFiles.php --conf ../LocalSettings-$DEPLOY.php -s "Updated using PutPages.sh" --overwrite "../deployments/$DEPLOY/pages/$1/*"
+ echo ""
+}
-DEPLOY=$1
NS=$2
+if [ -z "$2" ]
+then
+ echo "This script replaces the wikipages from the text files to the DB..."
+ echo "I am going to update pages in all the active NameSpaces for the specified deployment:"
+ ls ../deployments/$DEPLOY/pages/
+ echo ""
+ # echo "Enter to continue..."
+ read
+ for i in `ls ../deployments/$DEPLOY/pages/`
+ do
+ update_ns $i
+ done
-cd /srv/reevotech/www/wiki/maintenance/
-
+else
+ echo "This script replaces the wikipages from the text files to the DB..."
+ echo "I am going to process only the specificed NameSpace: $NS"
+ update_ns $NS
+fi
-php importTextFiles.php --conf ../LocalSettings-$DEPLOY.php -s "Updated using PutPages.sh" --overwrite "../deployments/$DEPLOY/pages/$NS/*"
+/usr/bin/php runJobs.php --conf /srv/reevotech/www/wiki/LocalSettings-$DEPLOY.php