diff --git a/bin/ncp-update b/bin/ncp-update index b6f7a333f..25753417f 100755 --- a/bin/ncp-update +++ b/bin/ncp-update @@ -29,14 +29,16 @@ fi } # shellcheck disable=SC2164 - [[ -f /.ncp-image ]] || cd "$TMPDIR" # update locally during build + [[ -f /.ncp-image ]] || { + cd "$TMPDIR" # update locally during build - [[ -z "$2" ]] || { - git fetch origin "$2" || { - echo "Error: Could not fetch $2" - exit 1 + [[ -z "$2" ]] || { + git fetch origin "$2" || { + echo "Error: Could not fetch $2" + exit 1 + } + git checkout FETCH_HEAD } - git checkout FETCH_HEAD } echo -e "Performing updates" @@ -61,4 +63,5 @@ fi echo -e "NextCloudPi updated to version $VER" exit 0 + } # force to read the whole thing into memory, as its contents might change in update.sh diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile index 7c1da624e..a0e1b3766 100644 --- a/build/docker/Dockerfile +++ b/build/docker/Dockerfile @@ -170,9 +170,7 @@ apt-get install --no-install-recommends -y wget ca-certificates; \ # install nextcloudpiset_app_param nc-datadir.sh DATADIR '/data-ro/ncdata' \ source /usr/local/etc/library.sh; \ cd /tmp/ncp-build/; \ -branch=master; \ -[[ "$ncp_ver" == "v0.0.0" ]] || branch="$ncp_ver"; \ -BRANCH="$branch" install_app ncp.sh; \ +install_app ncp.sh; \ mv /usr/local/etc/ncp-config.d/nc-init-copy.cfg /usr/local/etc/ncp-config.d/nc-init.cfg; \ run_app_unsafe bin/ncp/CONFIG/nc-init.sh; \