diff options
Diffstat (limited to 'bin/ncp-update')
-rwxr-xr-x | bin/ncp-update | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/bin/ncp-update b/bin/ncp-update index 615595f0..54f6a23e 100755 --- a/bin/ncp-update +++ b/bin/ncp-update @@ -11,17 +11,18 @@ cd /tmp/ncp-update-tmp echo -e "Performing updates" - ./update.sh + ./update.sh && { - VER=$( git describe --always --tags | grep -oP "v\d+\.\d+\.\d+" ) - grep -qP "v\d+\.\d+\.\d+" <<< "$VER" && { # check format - echo "$VER" > /usr/local/etc/ncp-version - echo "$VER" > /var/run/.ncp-latest-version + VER=$( git describe --always --tags | grep -oP "v\d+\.\d+\.\d+" ) + grep -qP "v\d+\.\d+\.\d+" <<< "$VER" && { # check format + echo "$VER" > /usr/local/etc/ncp-version + echo "$VER" > /var/run/.ncp-latest-version + } + echo -e "NextCloudPi updated to version $VER" } cd / rm -rf /tmp/ncp-update-tmp - echo -e "NextCloudPi updated to version $VER" exit } # force to read the whole thing into memory, as its contents might change in update.sh |