diff options
author | nachoparker <nacho@ownyourbits.com> | 2018-02-16 14:41:50 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2018-02-16 14:42:06 +0300 |
commit | 51b1e5dd526e2795521834b4da0866ee3eb88a1b (patch) | |
tree | f78c1e9b1a8106d5fc7916dee11d456437da5595 /bin | |
parent | f03931116fda60b5d37da512f426ed2663a2c1df (diff) |
update: accept github branch as an argument to ncp-update to test development branchv0.46.13
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ncp-update | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/ncp-update b/bin/ncp-update index 53cadc45..60141560 100755 --- a/bin/ncp-update +++ b/bin/ncp-update @@ -4,9 +4,14 @@ { [ "$(id -u)" -ne 0 ] && { printf "Must be run as root. Try 'sudo $0'\n"; exit 1; } + echo -e "Downloading updates" rm -rf /tmp/ncp-update-tmp - git clone --depth 20 -q https://github.com/nextcloud/nextcloudpi.git /tmp/ncp-update-tmp || { + + BRANCH="${1:-master}" + [[ "$BRANCH" != "master" ]] && echo "INFO: updating to development branch $BRANCH" + + git clone --depth 20 -b "$BRANCH" -q https://github.com/nextcloud/nextcloudpi.git /tmp/ncp-update-tmp || { echo "No internet connectivity" exit 1 } |