From db3c98d9e3e0e09e24f19aeec3922c85fee2e4ae Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Thu, 13 May 2010 10:22:34 +0530 Subject: [PATCH] easy install: preserve conf/VERSION if working off a tar file --- src/gl-easy-install | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gl-easy-install b/src/gl-easy-install index 52df88b..82ec154 100755 --- a/src/gl-easy-install +++ b/src/gl-easy-install @@ -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 \