[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 010fac0 5/8: Optionally inhibit (re)cloning l
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 010fac0 5/8: Optionally inhibit (re)cloning lmi from git in 'install_msw.sh' |
Date: |
Wed, 17 Apr 2019 06:20:19 -0400 (EDT) |
branch: master
commit 010fac0a22edf0143cb571ff119a736fdabe9dca
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Optionally inhibit (re)cloning lmi from git in 'install_msw.sh'
---
install_msw.sh | 33 ++++++++++++++++++++-------------
1 file changed, 20 insertions(+), 13 deletions(-)
diff --git a/install_msw.sh b/install_msw.sh
index 41c5d04..7ec7bd7 100755
--- a/install_msw.sh
+++ b/install_msw.sh
@@ -124,20 +124,24 @@ java -version
mkdir --parents /opt/lmi/src
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.
+# Set 'inhibit_git_clone=1' to test uncommitted changes.
+if [ "$inhibit_git_clone" != 1 ]
+then
+ # 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
+ cp --archive lmi lmi-moved-"$stamp0"
+ rm -rf /opt/lmi/src/lmi
-# Use git's own protocol wherever possible. In case that's blocked
-# 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.
+ # Use git's own protocol wherever possible. In case that's blocked
+ # 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
+ 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
+fi
cd /opt/lmi/src/lmi || print "Cannot cd"
@@ -282,9 +286,12 @@ fi
# to be discarded, and any differences in the '.git' subdirectory,
# which are presumably important to keep.
-if [ -d /opt/lmi/src/lmi-moved-"$stamp0" ]
+if [ "$inhibit_git_clone" != 1 ]
then
-cd /opt/lmi/src && mv lmi lmi-new-"$stamp0" && mv lmi-moved-"$stamp0" lmi
+ if [ -d /opt/lmi/src/lmi-moved-"$stamp0" ]
+ then
+ cd /opt/lmi/src && mv lmi lmi-new-"$stamp0" && mv lmi-moved-"$stamp0" lmi
+ fi
fi
stamp1=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
- [lmi-commits] [lmi] master updated (7448016 -> 7515165), Greg Chicares, 2019/04/17
- [lmi-commits] [lmi] master 3b11a29 3/8: Don't export variables not used by any child process, Greg Chicares, 2019/04/17
- [lmi-commits] [lmi] master b978a73 4/8: Restrict $PATH to a hardcoded minimum in 'install_msw.sh', Greg Chicares, 2019/04/17
- [lmi-commits] [lmi] master 010fac0 5/8: Optionally inhibit (re)cloning lmi from git in 'install_msw.sh',
Greg Chicares <=
- [lmi-commits] [lmi] master 7515165 8/8: Add a more radical alternative to 'clobber', Greg Chicares, 2019/04/17
- [lmi-commits] [lmi] master 373ebe5 1/8: Update PETE for gcc-8.x, Greg Chicares, 2019/04/17
- [lmi-commits] [lmi] master 7ef9543 7/8: Rename a local variable, Greg Chicares, 2019/04/17
- [lmi-commits] [lmi] master ec9f2e2 2/8: Improve documentation, Greg Chicares, 2019/04/17
- [lmi-commits] [lmi] master 7c8467c 6/8: Inhibit (re)cloning lmi into lmi srcdir, Greg Chicares, 2019/04/17