#!/bin/sh PWD=$(pwd) . ${PWD}/variables.conf function check_branch { URL=$(svn info | grep ^URL | sed 's/.*: //') } if [[ $1 == "dev" ]];then rsync -a --delete --exclude=.svn tug.org::tldevsrc/Build/source . else rsync -a --delete --exclude=.svn tug.org::tldevsrc/Build/source . if [[ -d ${PWD}/source ]];then cd ${PWD}/source svn info 2>/dev/null if [[ $? -ne 0 ]];then cd ${PWD} rm -rf ${PWD}/source svn co --config-option config:miscellany:use-commit-times=yes \ svn://tug.org/texlive/branches/branch${TL_BRANCH}/Build/source else check_branch if [[ ${URL} == "svn://tug.org/texlive/branches/branch${TL_BRANCH}/Build/source" ]];then svn revert -R . svn cleanup . --remove-unversioned --remove-ignored svn update else echo "I don't know what to do with your source/ directory. Please rename it" echo "or remove it then re-run this command." fi fi else svn co --config-option config:miscellany:use-commit-times=yes \ svn://tug.org/texlive/branches/branch${TL_BRANCH}/Build/source fi cd ${PWD} fi