Merge pull request #1373 from dentrado/check-version-on-upgrade
Print "already up-to-date" on upgrade if that's the case.
This commit is contained in:
commit
3d6550985d
1 changed files with 4 additions and 1 deletions
5
bin/lein
5
bin/lein
|
@ -265,6 +265,10 @@ elif [ "$1" = "upgrade" ] || [ "$1" = "downgrade" ]; then
|
|||
LEIN_SCRIPT_URL="https://github.com/technomancy/leiningen/raw/$TARGET_VERSION/bin/lein"
|
||||
$HTTP_CLIENT "$TARGET" "$LEIN_SCRIPT_URL"
|
||||
if [ $? == 0 ]; then
|
||||
cmp -s "$TARGET" "$SCRIPT"
|
||||
if [ $? == 0 ]; then
|
||||
echo "Leiningen is already up-to-date."
|
||||
fi
|
||||
mv "$TARGET" "$SCRIPT" && chmod +x "$SCRIPT"
|
||||
exec "$SCRIPT" version
|
||||
else
|
||||
|
@ -345,4 +349,3 @@ else
|
|||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue