diff options
author | nachoparker <nacho@ownyourbits.com> | 2017-11-16 21:27:00 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2017-11-16 21:34:02 +0300 |
commit | 95240caadb25442a56f1134cf01ed7aefac475b2 (patch) | |
tree | 5fb0b5ee4d8a969d1603e49b8b015af3c2878ef2 /bin/ncp-update | |
parent | 7e126fdda9bcdc5778c231e144006fbb16b2f1b4 (diff) |
update: check return codev0.34.14
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 |