[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
- [lmi-commits] [lmi] master 14ff0cb 01/12: Add a note about branching, (continued)
- [lmi-commits] [lmi] master 14ff0cb 01/12: Add a note about branching, Greg Chicares, 2020/06/11
- [lmi-commits] [lmi] master c7016ba 05/12: Add all groups before adding any user, Greg Chicares, 2020/06/11
- [lmi-commits] [lmi] master 6e50a5d 02/12: Create a root-owned file in root's $HOME, not someone else's, Greg Chicares, 2020/06/11
- [lmi-commits] [lmi] master 6a0b050 06/12: Refactor to make multi-user configuration easier, Greg Chicares, 2020/06/11
- [lmi-commits] [lmi] master a75ef22 04/12: Extract blocks into sub-scripts #24, Greg Chicares, 2020/06/11
- [lmi-commits] [lmi] master 8bf7f0e 03/12: Extract block into sub-script #29, Greg Chicares, 2020/06/11
- [lmi-commits] [lmi] master 0331fca 12/12: Configure 'wine' for each user, Greg Chicares, 2020/06/11
- [lmi-commits] [lmi] master 4dcd8ee 08/12: Restrict permissions to 644 for home-directory files, Greg Chicares, 2020/06/11
- [lmi-commits] [lmi] master 9ef51ab 09/12: Configure all users, Greg Chicares, 2020/06/11
- [lmi-commits] [lmi] master 0d823ab 11/12: Merge 'lmi_setup_41.sh' into 'lmi_setup_40.sh', Greg Chicares, 2020/06/11
- [lmi-commits] [lmi] master bd371a2 10/12: Move git configuration,
Greg Chicares <=
- [lmi-commits] [lmi] master ad3d008 07/12: Simplify vim and zsh configuration, Greg Chicares, 2020/06/11