lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master e400f318 1/3: Consolidate `whoami`-dependent


From: Greg Chicares
Subject: [lmi-commits] [lmi] master e400f318 1/3: Consolidate `whoami`-dependent commands
Date: Wed, 1 Feb 2023 22:41:30 -0500 (EST)

branch: master
commit e400f318dc4416ce41c1f52309568c9a570de824
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Consolidate `whoami`-dependent commands
---
 lmi_setup_25.sh |  4 ----
 lmi_setup_43.sh | 15 +++++++--------
 2 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/lmi_setup_25.sh b/lmi_setup_25.sh
index d34d0182..26940a53 100755
--- a/lmi_setup_25.sh
+++ b/lmi_setup_25.sh
@@ -68,10 +68,6 @@ git config --global log.follow true
 git config --global pull.ff only
 git config --global push.default simple
 git config --global push.recurseSubmodules check
-if [ "greg" = "$(whoami)" ]; then
-git config --global user.email gchicares@sbcglobal.net
-git config --global user.name "Gregory W. Chicares"
-fi
 
 echo '.*.sw?' > ~/.gitignore
 
diff --git a/lmi_setup_43.sh b/lmi_setup_43.sh
index 973c4fb2..0776a96a 100755
--- a/lmi_setup_43.sh
+++ b/lmi_setup_43.sh
@@ -39,12 +39,6 @@ cd /opt/lmi/src/lmi || { printf 'failed: cd\n'; exit 3; }
 mv .git/hooks .git/hooks-orig
 ln --symbolic --force --no-dereference ../hooks .git
 
-# Iff this chroot needs write access to savannah, then reconfigure
-# the URL, using your savannah ID instead of mine:
-if [ "greg" = "$(whoami)" ]; then
-  git remote set-url --push origin chicares@git.sv.gnu.org:/srv/git/lmi.git
-fi
-
 # Clone the bare proprietary repository to create a working copy.
 #
 # Apparently '--config core.SharedRepository=group' would have little
@@ -130,8 +124,13 @@ git clone git://git.savannah.nongnu.org/lmi.git \
 cd lmi || { printf 'failed: cd\n'; exit 3; }
 
 if [ "greg" = "$(whoami)" ]; then
-git remote add xanadu     https://github.com/vadz/lmi.git   || echo "Oops."
-git remote add shangri-la https://github.com/thesiv/lmi.git || echo "Oops."
+git config --global user.email gchicares@sbcglobal.net
+git config --global user.name "Gregory W. Chicares"
+# Iff this chroot needs write access to savannah, then reconfigure
+# the URL, using your savannah ID instead of mine:
+  git remote set-url --push origin chicares@git.sv.gnu.org:/srv/git/lmi.git
+  git remote add xanadu     https://github.com/vadz/lmi.git   || echo "Oops."
+  git remote add shangri-la https://github.com/thesiv/lmi.git || echo "Oops."
 fi
 
 find . -path ./.git -prune -o -type f -print0 \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]