lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master bd371a2 10/12: Move git configuration


From: Greg Chicares
Subject: [lmi-commits] [lmi] master bd371a2 10/12: Move git configuration
Date: Thu, 11 Jun 2020 20:58:33 -0400 (EDT)

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

    Move git configuration
    
    Configured git, vim, and zsh for each user in the same place.
    
    Installed git in the centos chroot so that the same 'lmi_setup_25.sh'
    can be used there as elsewhere.
    
    Incidentally removed a duplicative invocation of 'mkspell' and a
    needless 'cd ~'.
---
 lmi_setup_05c.sh |  2 +-
 lmi_setup_25.sh  | 17 ++++++++++++++++-
 lmi_setup_41.sh  | 20 +-------------------
 3 files changed, 18 insertions(+), 21 deletions(-)

diff --git a/lmi_setup_05c.sh b/lmi_setup_05c.sh
index 578f435..a3f6cbd 100755
--- a/lmi_setup_05c.sh
+++ b/lmi_setup_05c.sh
@@ -55,7 +55,7 @@ findmnt /dev/pts
 
 sed -i /etc/yum.conf -e's/keepcache=0/keepcache=1/'
 
-yum --assumeyes install ncurses-term less sudo vim zsh
+yum --assumeyes install git less ncurses-term sudo vim zsh
 
 chsh -s /bin/zsh root
 
diff --git a/lmi_setup_25.sh b/lmi_setup_25.sh
index 1a6291f..3e973f6 100755
--- a/lmi_setup_25.sh
+++ b/lmi_setup_25.sh
@@ -47,5 +47,20 @@ mkdir -p ~/.vim/spell
 cp -a en.utf-8.add ~/.vim/spell/en.utf-8.add
 vim -es -c ':mkspell! ~/.vim/spell/en.utf-8.add' -c ':q'
 
+# Configure git. See:
+#   https://lists.nongnu.org/archive/html/lmi/2016-03/msg00006.html
+git config --global color.ui auto
+git config --global commit.cleanup scissors
+git config --global core.pager "less -+F -+X"
+git config --global diff.colormoved plain
+git config --global log.date iso8601-strict-local
+git config --global log.follow true
+git config --global pull.ff only
+git config --global push.default simple
+if [ "greg" = "$(whoami)" ]; then
+git config --global user.email gchicares@sbcglobal.net
+git config --global user.name "Gregory W. Chicares"
+fi
+
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Configured zsh and vim for user '$(whoami)'."  | tee /dev/tty
+echo "$stamp $0: Configured {zsh,vim,git} for user '$(whoami)'."  | tee 
/dev/tty
diff --git a/lmi_setup_41.sh b/lmi_setup_41.sh
index 7908cf3..dcff149 100755
--- a/lmi_setup_41.sh
+++ b/lmi_setup_41.sh
@@ -53,23 +53,5 @@ mkdir -p ~/.wine/drive_c/users/"${NORMAL_USER}"/var/opt/
 cd ~/.wine/drive_c/users/"${NORMAL_USER}"/var/opt/ || { printf 'failed: cd\n'; 
exit 3; }
 ln --symbolic --relative --force --no-dereference /var/opt/lmi/ ./lmi
 
-cd ~ || { printf 'failed: cd\n'; exit 3; }
-# Rebuild vim spellfile (as was done above for root)
-vim -es -c ':mkspell! ~/.vim/spell/en.utf-8.add' -c ':q'
-
-# Configure git. See:
-#   https://lists.nongnu.org/archive/html/lmi/2016-03/msg00006.html
-git config --global color.ui auto
-git config --global commit.cleanup scissors
-git config --global core.pager "less -+F -+X"
-git config --global diff.colormoved plain
-git config --global log.date iso8601-strict-local
-git config --global log.follow true
-git config --global pull.ff only
-git config --global push.default simple
-# Use your own name and email address.
-git config --global user.email gchicares@sbcglobal.net
-git config --global user.name "Gregory W. Chicares"
-
 stamp=$(date -u +'%Y%m%dT%H%M%SZ')
-echo "$stamp $0: Configured 'wine' etc. for '$NORMAL_USER'."  | tee /dev/tty
+echo "$stamp $0: Configured 'wine' for '$NORMAL_USER'."  | tee /dev/tty



reply via email to

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