diff options
Diffstat (limited to 'bin/reevotech/PullPages.sh')
-rwxr-xr-x | bin/reevotech/PullPages.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/bin/reevotech/PullPages.sh b/bin/reevotech/PullPages.sh new file mode 100755 index 00000000..e479e39e --- /dev/null +++ b/bin/reevotech/PullPages.sh @@ -0,0 +1,34 @@ +#!/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 |