Skip to content

Commit

Permalink
Show current version in MOTD when there is an update available
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Jun 28, 2017
1 parent c33cabc commit 709cd60
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bin/ncp-check-updates
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

# print message if an update is available

VERFILE=/var/run/.ncp-latest-version
VERFILE=/usr/local/etc/ncp-version
LATEST=/var/run/.ncp-latest-version

if ncp-test-updates; then
echo -e "\nNextCloudPi \e[1m$( cat $VERFILE )\e[0m available!!"
echo -e "update through 'nextcloudpi-config' or type 'sudo ncp-update'"
echo -e "\nNextCloudPi \e[1m$( cat $VERFILE)\e[0m is outdated"
echo -e "update to \e[1m$( cat $LATEST )\e[0m through 'nextcloudpi-config' or type 'sudo ncp-update'"
else
echo -e "\nNextCloudPi \e[1m$( cat /usr/local/etc/ncp-version )\e[0m is up to date"
echo -e "\nNextCloudPi \e[1m$( cat $VERFILE)\e[0m is up to date"
fi

0 comments on commit 709cd60

Please sign in to comment.