#!/bin/bash # Use: ./bin/reevotech/PutPages.sh ecoversities Property if [ $# -eq 0 ] then echo "Missing parameters. Use: ./bin/reevotech/PutPages.sh ecoversities Help" exit fi DEPLOY=$1 cd /srv/reevotech/www/wiki/maintenance/ 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 "" } 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 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 /usr/bin/php runJobs.php --conf /srv/reevotech/www/wiki/LocalSettings-$DEPLOY.php