From f94f29b2d4a9baa175ebfa634427a6c6db0a76f9 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Sat, 21 Mar 2020 18:15:33 +0100 Subject: [PATCH] Fix link to moulinette and ssowat --- run.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/run.sh b/run.sh index 2599692..aa3cc66 100755 --- a/run.sh +++ b/run.sh @@ -16,9 +16,13 @@ link_moulinette_from_git() { moulinette_dir="/tmp/ci_moulinette" lxc exec "$CONTAINER_ID" -- sh -c "mkdir $moulinette_dir" lxc exec "$CONTAINER_ID" -- sh -c "git clone https://github.com/YunoHost/moulinette $moulinette_dir" - lxc exec "$CONTAINER_ID" -- sh -c "pushd $moulinette_dir" - lxc exec "$CONTAINER_ID" -- sh -c "if git ls-remote --heads | grep -q $CURRENT_BRANCH; then git checkout $CURRENT_BRANCH; else git checkout $DEFAULT_BRANCH; fi" - lxc exec "$CONTAINER_ID" -- sh -c "popd" + lxc exec "$CONTAINER_ID" -- sh -c "(cd $moulinette_dir; \ + if git ls-remote --heads | grep -q $CURRENT_BRANCH; \ + then \ + git checkout $CURRENT_BRANCH; \ + else \ + git checkout $DEFAULT_BRANCH; \ + fi)" create_sym_link "$moulinette_dir/locales" "/usr/share/moulinette/locale" create_sym_link "$moulinette_dir/moulinette" "/usr/lib/python2.7/dist-packages/moulinette" @@ -28,9 +32,13 @@ link_ssowat_from_git() { ssowat_dir="/tmp/ci_ssowat" lxc exec "$CONTAINER_ID" -- sh -c "mkdir $ssowat_dir" lxc exec "$CONTAINER_ID" -- sh -c "git clone https://github.com/YunoHost/ssowat $ssowat_dir" - lxc exec "$CONTAINER_ID" -- sh -c "pushd $ssowat_dir" - lxc exec "$CONTAINER_ID" -- sh -c "if git ls-remote --heads | grep -q $CURRENT_BRANCH; then git checkout $CURRENT_BRANCH; else git checkout $DEFAULT_BRANCH; fi" - lxc exec "$CONTAINER_ID" -- sh -c "popd" + lxc exec "$CONTAINER_ID" -- sh -c "(cd $ssowat_dir; \ + if git ls-remote --heads | grep -q $CURRENT_BRANCH; \ + then \ + git checkout $CURRENT_BRANCH; \ + else \ + git checkout $DEFAULT_BRANCH; \ + fi)" create_sym_link "$ssowat_dir" "/usr/share/ssowat" }