From ddb9895ae679d31cc30ba3d7cf0f22fe25bec6fa Mon Sep 17 00:00:00 2001 From: onefang Date: Tue, 18 Oct 2022 11:54:10 +1000 Subject: Only git pull if it's a git version. Coz my local desktop test version is just symlinked instead of git updated. --- update_apt-panopticon | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/update_apt-panopticon b/update_apt-panopticon index b70f4c3..f2f3387 100755 --- a/update_apt-panopticon +++ b/update_apt-panopticon @@ -1,11 +1,15 @@ #!/bin/bash cd /var/www/html/apt-panopticon/apt-panopticon_cgp -#git pull > /dev/null -#chown -R mirrors:www-data * +if [ -f .git ] ; then + git pull > /dev/null + #chown -R mirrors:www-data * +fi cd /var/www/html/apt-panopticon/apt-panopticon -#git pull > /dev/null -#chown -R mirrors:www-data * +if [ -f .git ] ; then + git pull > /dev/null + #chown -R mirrors:www-data * +fi if [ ! -f apt-panopticon.lock ] ; then rm ../results; ln -s apt-panopticon/results_old ../results -- cgit v1.1