[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 4668a10 1/2: Refactor to avoid repetition
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 4668a10 1/2: Refactor to avoid repetition |
Date: |
Fri, 2 Oct 2020 10:42:12 -0400 (EDT) |
branch: master
commit 4668a10cd0d62d7d900e0896a8130e2d81d4d9ca
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Refactor to avoid repetition
---
install_msw.sh | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/install_msw.sh b/install_msw.sh
index 1ef767a..a5fd87f 100755
--- a/install_msw.sh
+++ b/install_msw.sh
@@ -205,9 +205,12 @@ then
# 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 "$coefficiency" --recurse-submodules
git://git.savannah.nongnu.org/lmi.git \
- || git clone "$coefficiency" --recurse-submodules
https://git.savannah.nongnu.org/r/lmi.git \
- || git clone "$coefficiency" --recurse-submodules
https://github.com/vadz/lmi.git
+ clone_opts="$coefficiency --recurse-submodules"
+ # 'git clone' options must not be double-quoted
+ # shellcheck disable=SC2086
+ git clone $clone_opts git://git.savannah.nongnu.org/lmi.git \
+ || git clone $clone_opts https://git.savannah.nongnu.org/r/lmi.git \
+ || git clone $clone_opts https://github.com/vadz/lmi.git
fi
cd /opt/lmi/src/lmi || printf 'Cannot cd\n'