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-test-updates')
-rwxr-xr-xbin/ncp-test-updates4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/ncp-test-updates b/bin/ncp-test-updates
index 1a362401..e439a55e 100755
--- a/bin/ncp-test-updates
+++ b/bin/ncp-test-updates
@@ -5,7 +5,9 @@
NEED_UPDATE=false
VERFILE=/var/run/.ncp-latest-version
-if test -f $VERFILE && grep -qP "v\d+\.\d+\.\d+" $VERFILE; then
+[[ $( cat $VERFILE | wc -c ) -eq 0 ]] && ncp-check-version
+
+if grep -qP "v\d+\.\d+\.\d+" $VERFILE; then
MAJOR=$( grep -oP "\d+\.\d+\.\d+" $VERFILE | cut -d. -f1 )
MINOR=$( grep -oP "\d+\.\d+\.\d+" $VERFILE | cut -d. -f2 )