From e373a160ba9c441a864388270665b8c16f9de96f Mon Sep 17 00:00:00 2001 From: Conor Walsh Date: Sat, 24 Oct 2020 14:56:30 +0100 Subject: [PATCH] Ensure that git repo is available before running --- update-renew-from-github.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/update-renew-from-github.sh b/update-renew-from-github.sh index affa435..c8fecb2 100644 --- a/update-renew-from-github.sh +++ b/update-renew-from-github.sh @@ -7,6 +7,9 @@ # ensure we are in the correct directory cd /var/www/renew +# check the repo is available +git ls-remote http://github.com/ULCompSoc/skynet.ie-renew.git -q || { echo 'Repo not available' ; exit 1; } + # delete all files in directory except for this script ls | grep -v update-renew-from-github.sh | xargs rm -rf --