From 950825f1cd9f0f8f077b4470cf42ed2bcd536f84 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 24 Sep 2014 22:17:44 +0100 Subject: [PATCH] Only download if the file doesn't already exist --- install-freedombone.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/install-freedombone.sh b/install-freedombone.sh index c09ba76d..f1c6eefb 100755 --- a/install-freedombone.sh +++ b/install-freedombone.sh @@ -151,15 +151,15 @@ function argument_checks { exit 1 fi if [ ! $DOMAIN_NAME ]; then - show_help + show_help exit 2 fi if [ ! $MY_USERNAME ]; then - show_help + show_help exit 3 fi if [ ! $FREEDNS_SUBDOMAIN_CODE ]; then - show_help + show_help exit 4 fi } @@ -1597,7 +1597,9 @@ function install_owncloud { # download owncloud cd $INSTALL_DIR - wget $OWNCLOUD_DOWNLOAD + if [ ! -f $INSTALL_DIR/$OWNCLOUD_ARCHIVE ]; then + wget $OWNCLOUD_DOWNLOAD + fi if [ ! -f $INSTALL_DIR/$OWNCLOUD_ARCHIVE ]; then echo 'Owncloud could not be downloaded. Check that it exists at ' echo $OWNCLOUD_DOWNLOAD