easy install: preserve conf/VERSION if working off a tar file

This commit is contained in:
Sitaram Chamarty 2010-05-13 10:22:34 +05:30
parent 9612e3a4cc
commit db3c98d9e3

View file

@ -197,7 +197,12 @@ version_info() {
# MANUAL: if needed, make a note of the version you are upgrading from, and to
# record which version is being sent across; we assume it's HEAD
git describe --tags --long HEAD 2>/dev/null > conf/VERSION || echo '(unknown)' > conf/VERSION
if git rev-parse --is-inside-work-tree 2>/dev/null
then
git describe --tags --long HEAD 2>/dev/null > conf/VERSION || echo '(unknown)' > conf/VERSION
else
[[ -f conf/VERSION ]] || echo '(unknown)' > conf/VERSION
fi
# what was the old version there?
export upgrade_details="you are upgrading \