diff options
author | nachoparker <nacho@ownyourbits.com> | 2018-04-04 15:21:10 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2018-04-04 20:32:07 +0300 |
commit | 16e245cf697a88917d07fc0f72af4d27edc1e34b (patch) | |
tree | 2c5b40065e7cd31fd9905ad8e65b290dedb3cc15 /bin/ncp-test-updates | |
parent | 8a2d30a6b2cf335098391b6ccf985b14cafd1fee (diff) |
ncp-web: check for updates upon first runv0.53.20
Diffstat (limited to 'bin/ncp-test-updates')
-rwxr-xr-x | bin/ncp-test-updates | 4 |
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 ) |