#!/bin/bash # Use: ./bin/reevotech/PullPages.sh ecoversities Help if [ $# -eq 0 ] then echo "Missing parameters. Use: ./bin/reevotech/PullPages.sh ecoversities Help" exit fi cd /srv/reevotech DEPLOY=$1 DEPLOYFILE=`ls ./etc | grep $DEPLOY` NS=$2 DOMAIN=`cat ./etc/$DEPLOYFILE | grep 'REEVO_URL =' | cut -d'"' -f 2` # echo $DEPLOY # echo $DEPLOYFILE # echo $DOMAIN cd ./www/wiki/deployments/$DEPLOY if [[ -d pages_tmp/$NS ]] then echo "" cd pages_tmp/$NS git pull cd ../../ else git clone -c remote.origin.namespaces="$NS" mediawiki::http://$DOMAIN pages_tmp/$NS fi cp -rf pages_tmp/$NS pages rm -rf pages/$NS/.git