diff options
Diffstat (limited to 'checkout-tl.sh')
-rwxr-xr-x | checkout-tl.sh | 39 |
1 files changed, 32 insertions, 7 deletions
diff --git a/checkout-tl.sh b/checkout-tl.sh index 4d42437..ee3795c 100755 --- a/checkout-tl.sh +++ b/checkout-tl.sh | |||
@@ -1,12 +1,37 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | PWD=$(pwd) | ||
3 | |||
4 | . ${PWD}/variables.conf | ||
5 | |||
6 | function check_branch { | ||
7 | URL=$(svn info | grep ^URL | sed 's/.*: //') | ||
8 | } | ||
9 | |||
2 | if [[ $1 == "dev" ]];then | 10 | if [[ $1 == "dev" ]];then |
3 | rsync -a --delete --exclude=.svn tug.org::tldevsrc/Build/source . | 11 | rsync -a --delete --exclude=.svn tug.org::tldevsrc/Build/source . |
4 | else | 12 | else |
5 | # source variables | 13 | if [[ -d ${PWD}/source ]];then |
6 | PWD=$(pwd) | 14 | cd ${PWD}/source |
7 | TMPDIR=$(mktemp -d) | 15 | svn info 2>/dev/null |
8 | . ${PWD}/variables.conf | 16 | if [[ $? -ne 0 ]];then |
9 | [[ -d "texlive-${TL_PUBDATE}-source" ]] && rm -rf texlive-${TL_PUBDATE}-source | 17 | cd ${PWD} |
10 | wget --show-progress https://mirrors.ctan.org/systems/texlive/Source/texlive-${TL_PUBDATE}-source.tar.xz -P ${TMPDIR}/ | 18 | rm -rf ${PWD}/source |
11 | xzcat ${TMPDIR}/texlive-${TL_PUBDATE}-source.tar.xz | tar xf - | 19 | svn co --config-option config:miscellany:use-commit-times=yes \ |
20 | svn://tug.org/texlive/branches/branch${TL_BRANCH}/Build/source | ||
21 | else | ||
22 | check_branch | ||
23 | if [[ ${URL} == "svn://tug.org/texlive/branches/branch${TL_BRANCH}/Build/source" ]];then | ||
24 | svn revert -R . | ||
25 | svn cleanup . --remove-unversioned --remove-ignored | ||
26 | svn update | ||
27 | else | ||
28 | echo "I don't know what to do with your source/ directory. Please rename it" | ||
29 | echo "or remove it then re-run this command." | ||
30 | fi | ||
31 | fi | ||
32 | else | ||
33 | svn co --config-option config:miscellany:use-commit-times=yes \ | ||
34 | svn://tug.org/texlive/branches/branch${TL_BRANCH}/Build/source | ||
35 | fi | ||
36 | cd ${PWD} | ||
12 | fi | 37 | fi |