[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master b71dd70: Restore any original source director
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master b71dd70: Restore any original source directory after msw reinstallation |
Date: |
Mon, 16 Apr 2018 16:24:02 -0400 (EDT) |
branch: master
commit b71dd7037873c920220369aeabcd7e8b659602c9
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Restore any original source directory after msw reinstallation
It is hoped that the 'cp'+'rm' kludge of commit c34288bf1599 will not
be needed here.
---
install_msw.sh | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/install_msw.sh b/install_msw.sh
index a9c0905..adf2020 100755
--- a/install_msw.sh
+++ b/install_msw.sh
@@ -122,6 +122,7 @@ cd /opt/lmi/src || print "Cannot cd"
# Preserve any preexisting source directory, moving it aside so that
# 'git clone' will install a pristine working copy.
+
cp --archive lmi lmi-moved-"$stamp0"
rm -rf /opt/lmi/src/lmi
@@ -129,6 +130,7 @@ rm -rf /opt/lmi/src/lmi
# by a corporate firewall, fall back on https. In case a firewall
# inexplicably blocks the gnu.org domain, try Vadim's github clone
# as a last resort.
+
git clone git://git.savannah.nongnu.org/lmi.git \
|| git clone https://git.savannah.nongnu.org/r/lmi.git \
|| git clone https://github.com/vadz/lmi.git
@@ -247,6 +249,19 @@ then
sed -i /opt/lmi/data/configurable_settings.xml -e's/C://g'
fi
+# Restore any preexisting source directory that had been preserved
+# above, renaming the pristine checkout that had replaced it.
+#
+# Simply running 'git pull' should make the two directories identical
+# except for any local changes or additions, which are presumably not
+# to be discarded, and any differences in the '.git' subdirectory,
+# which are presumably important to keep.
+
+if [ -d lmi-moved-"$stamp0" ]
+then
+cd /opt/lmi/src && mv lmi lmi-new-"$stamp0" && mv lmi-moved-"$stamp0" lmi
+fi
+
stamp1=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo "Finished: $stamp1"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [lmi] master b71dd70: Restore any original source directory after msw reinstallation,
Greg Chicares <=