]> git.parisson.com Git - docker-django-scripts.git/commitdiff
Fixed crashing script on macOS because of chown with a non-existent user
authorRaphael Voyazopoulos <raphael.voyazopoulos@ircam.fr>
Tue, 13 Feb 2018 14:55:53 +0000 (15:55 +0100)
committerRaphael Voyazopoulos <raphael.voyazopoulos@ircam.fr>
Tue, 13 Feb 2018 14:55:53 +0000 (15:55 +0100)
pull.sh

diff --git a/pull.sh b/pull.sh
index 3f6998b45246c9c4555613819b70dcd295bbe637..9abe1934e4077fda07201f052f373ff241a5dc32 100755 (executable)
--- a/pull.sh
+++ b/pull.sh
@@ -17,5 +17,8 @@ if [ "$1" = "--restore-db" ];
 fi
 
 # We need to chown folders as they are docker's volumes
-sudo chown -R www-data var/media
-sudo chown -R root var/backup
+# (do not work on OSX, hence the test)
+if ! uname -a | grep Darwin > /dev/null; then
+  sudo chown -R www-data var/media
+  sudo chown -R root var/backup
+fi