diff options
author | Daniel Hansson <daniel@techandme.se> | 2017-06-09 13:27:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-09 13:27:33 +0300 |
commit | a5dae67851535d647e66521f9224245256b935a9 (patch) | |
tree | 87747dadb56db2bada4fa76096fbade6a161b4a9 /static/update.sh | |
parent | 64c7baef10a94b675724b5afea4f1fe76e794326 (diff) |
create function for running scripts in master (#257)
Diffstat (limited to 'static/update.sh')
-rw-r--r-- | static/update.sh | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/static/update.sh b/static/update.sh index b2cc945b..775d6e5f 100644 --- a/static/update.sh +++ b/static/update.sh @@ -13,8 +13,6 @@ true DEBUG=0 debug_mode -FILE=nextcloud_update.sh - # Must be root if ! is_root then @@ -24,22 +22,7 @@ fi mkdir -p "$SCRIPTS" -if [ -f "$SCRIPTS/$FILE" ] -then - rm -f "$SCRIPTS/$FILE" - wget -q "$GITHUB_REPO/$FILE" -P "$SCRIPTS" - bash "$SCRIPTS/$FILE" -else - wget -q "$GITHUB_REPO/$FILE" -P "$SCRIPTS" - bash "$SCRIPTS/$FILE" -fi - -chmod +x "$SCRIPTS/$FILE" - -# Remove potenial copy of the same file -if [ -f "$SCRIPTS/$FILE*" ] -then - rm -f "$SCRIPTS/$FILE*" -fi +# Delete, download, run +run_main_script nextcloud_update exit |