Commit Diff
Diff:
c5bfac5bcd1f9e46d84b4cbb6b72b395a4e4033c
6123f4333d09a452a1017a161c1cc376a230dba0
Commit:
6123f4333d09a452a1017a161c1cc376a230dba0
Tree:
11ce7f936287bfa3d5161c05e7582338e9f1e9d3
Author:
Fred. Galusik <dev1@galusik.xyz>
Committer:
Fred. Galusik <dev1@galusik.xyz>
Date:
Sun Sep 11 12:27:01 2016 UTC
Message:
The VAR Name was not the trouble. Grep has to handle only the 1st VERSION var so, add ^ to the filter
blob - 73afd30001478b57bb7a7929be38efaa806c7dc5
blob + 8b9179349ca7792fdfc45ab6b1f8fd2f43a9e2f9
--- snaps
+++ snaps
@@ -72,14 +72,14 @@ LASTSNAPS=/tmp/snaps
toupgrade() {
echo "Checking for new version..."
$GET -V -o "$LASTSNAPS" "$REMOTESNAPS"
- VERSIONREMOTE=$(grep "VERSION=" $LASTSNAPS | cut -d'=' -f2)
+ REMOTEVERSION=$(grep "^VERSION=" $LASTSNAPS | cut -d'=' -f2)
if [ $? -eq 0 ]; then
- if [ "$VERSION" != "$VERSIONREMOTE" ]; then
+ if [ "$VERSION" != "$REMOTEVERSION" ]; then
echo "---"
echo "This is not the last version of snaps".
- echo "Last version : $VERSIONREMOTE"
+ echo "Last version : $REMOTEVERSION"
echo "To upgrade, run 'snaps -u'"
echo "---"
fi
Frédéric Galusik