From f609be21528800fc2199f020e5dd214ca27620e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Thu, 21 Oct 2021 10:03:21 +0200 Subject: [PATCH] begin working on travis build script --- travis_build.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 travis_build.sh diff --git a/travis_build.sh b/travis_build.sh new file mode 100755 index 0000000..225c0e2 --- /dev/null +++ b/travis_build.sh @@ -0,0 +1,19 @@ +# ! /bin/sh +TRAVIS_BRANCH=algebraic-geometr + +rm -rf LatexPackagesBuild + +git clone https://github.com/kesslermaximilian/LatexPackagesBuild.git LatexPackagesBuild +cd LatexPackagesBuild +FOUND=$(git branch -a | sed -n '/remotes\/origin\/.*-build/p' | sed 's/remotes\/origin\///g' | sed 's/-build//g' | sed 's/[[:space:]]//g' | sed -n "/^${TRAVIS_BRANCH}$/p") + +echo ${FOUND} + +if [ "$FOUND" = "" ];then + git checkout --orphan ${TRAVIS_BRANCH}-build + ls -ra | sed '/^\.git$/d' | sed '/^\.\.$/d' | sed '/^\.$/d' | xargs -r git rm --cached + ls -ra | sed '/^\.git$/d' | sed '/^\.\.$/d' | sed '/^\.$/d' | xargs -r rm -rf +else + echo "found" + git checkout -b ${FOUND}-build origin/${FOUND}-build +fi