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:
Jean Niklas L'orange 2013-11-19 17:43:35 -08:00
commit 3d6550985d

View file

@ -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