Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2017-04-04 18:19:48 +0300
committernachoparker <nacho@ownyourbits.com>2017-04-04 18:38:21 +0300
commit1c19f4c3620d5bc4b13458306ab29587890e2cee (patch)
tree07b4da381c0b49429ca11a49657cf72120fd52d6 /bin/ncp-update
parenteaf3fe7c7b4ea61efde1bfacc6437af7ebd497bb (diff)
fix ncp-update with no internet accessv0.5.6
Diffstat (limited to 'bin/ncp-update')
-rwxr-xr-xbin/ncp-update21
1 files changed, 21 insertions, 0 deletions
diff --git a/bin/ncp-update b/bin/ncp-update
new file mode 100755
index 00000000..12089bf1
--- /dev/null
+++ b/bin/ncp-update
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+# update latest NextCloudPi code from github
+
+ping -W 2 -w 1 -q github.com &>/dev/null || { echo "No internet connectivity"; exit 1; }
+echo -e "Downloading updates"
+rm -rf /tmp/ncp-update-tmp
+git clone -q --depth 1 https://github.com/nachoparker/nextcloud-raspbian-generator.git /tmp/ncp-update-tmp || exit 1
+cd /tmp/ncp-update-tmp
+
+echo -e "Performing updates"
+./update.sh
+
+VER=$( git describe --always --tags )
+echo $VER > /usr/local/etc/ncp-version
+echo $VER > /var/run/.ncp-latest-version
+
+cd /
+rm -rf /tmp/ncp-update-tmp
+
+echo -e "NextCloudPi updated to version \e[1m$VER\e[0m"