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:
Diffstat (limited to 'bin/ncp-check-version')
-rwxr-xr-xbin/ncp-check-version8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/ncp-check-version b/bin/ncp-check-version
index 3cb25c18..5075edfb 100755
--- a/bin/ncp-check-version
+++ b/bin/ncp-check-version
@@ -8,11 +8,11 @@ ping -W 2 -w 1 -q github.com &>/dev/null || { echo "No internet connectivity";
git clone --depth 20 -q --bare https://github.com/nextcloud/nextcloudpi.git /tmp/ncp-check-tmp || exit 1
-cd /tmp/ncp-check-tmp
+cd /tmp/ncp-check-tmp || exit 1
VER=$( git describe --always --tags | grep -oP "v\d+\.\d+\.\d+" )
-grep -qP "v\d+\.\d+\.\d+" <<< $VER && { # check format
- echo $VER > /var/run/.ncp-latest-version
+grep -qP "v\d+\.\d+\.\d+" <<< "$VER" && { # check format
+ echo "$VER" > /var/run/.ncp-latest-version
}
-cd /
+cd / || exit 1
rm -rf /tmp/ncp-check-tmp