lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 5a6c188 07/10: Extract blocks into sub-script


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 5a6c188 07/10: Extract blocks into sub-scripts #01
Date: Thu, 28 May 2020 20:34:09 -0400 (EDT)

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

    Extract blocks into sub-scripts #01
---
 install_redhat.sh                    | 29 +---------------
 lmi_setup_00.sh                      | 26 +--------------
 lmi_setup_00c.sh                     | 64 +-----------------------------------
 lmi_setup_00c.sh => lmi_setup_01.sh  | 42 ++---------------------
 lmi_setup_00c.sh => lmi_setup_01c.sh |  2 +-
 lmi_setup_00c.sh => lmi_setup_01r.sh | 41 ++---------------------
 6 files changed, 9 insertions(+), 195 deletions(-)

diff --git a/install_redhat.sh b/install_redhat.sh
index 775eb72..3ce035a 100755
--- a/install_redhat.sh
+++ b/install_redhat.sh
@@ -90,34 +90,7 @@ set -evx
 assert_su
 assert_not_chrooted
 
-./lmi_setup_02.sh
-./lmi_setup_05r.sh
-./lmi_setup_07r.sh
-./lmi_setup_10r.sh
-./lmi_setup_11.sh
-
-# BEGIN ./lmi_setup_13.sh
-# For caveats, see:
-#    https://lists.nongnu.org/archive/html/lmi/2020-05/msg00040.html
-mkdir -p /srv/cache_for_lmi
-du   -sb /srv/chroot/"${CHRTNAME}"/srv/cache_for_lmi || echo "Okay."
-mkdir -p /srv/chroot/"${CHRTNAME}"/srv/cache_for_lmi
-mount --bind /srv/cache_for_lmi /srv/chroot/"${CHRTNAME}"/srv/cache_for_lmi
-# END   ./lmi_setup_13.sh
-
-cp -a lmi_setup_*.sh /tmp/schroot_env /srv/chroot/${CHRTNAME}/tmp
-schroot --chroot=${CHRTNAME} --user=root             --directory=/tmp 
./lmi_setup_20.sh
-schroot --chroot=${CHRTNAME} --user=root             --directory=/tmp 
./lmi_setup_21.sh
-# On a particular corporate server, root is not a sudoer.
-if sudo -l true; then
-  sudo                       --user="${NORMAL_USER}"                  
./lmi_setup_30.sh
-else
-  su                                "${NORMAL_USER}"                  
./lmi_setup_30.sh
-fi
-schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_40.sh
-schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_41.sh
-schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_42.sh
-schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_43.sh
+./lmi_setup_01r.sh
 
 # Copy log files that may be useful for tracking down problems with
 # certain commands whose output is voluminous and often uninteresting.
diff --git a/lmi_setup_00.sh b/lmi_setup_00.sh
index e7b0311..5485464 100755
--- a/lmi_setup_00.sh
+++ b/lmi_setup_00.sh
@@ -90,31 +90,7 @@ set -evx
 assert_su
 assert_not_chrooted
 
-./lmi_setup_10.sh
-./lmi_setup_11.sh
-
-# BEGIN ./lmi_setup_13.sh
-# For caveats, see:
-#    https://lists.nongnu.org/archive/html/lmi/2020-05/msg00040.html
-mkdir -p /srv/cache_for_lmi
-du   -sb /srv/chroot/"${CHRTNAME}"/srv/cache_for_lmi || echo "Okay."
-mkdir -p /srv/chroot/"${CHRTNAME}"/srv/cache_for_lmi
-mount --bind /srv/cache_for_lmi /srv/chroot/"${CHRTNAME}"/srv/cache_for_lmi
-# END   ./lmi_setup_13.sh
-
-cp -a lmi_setup_*.sh /tmp/schroot_env /srv/chroot/${CHRTNAME}/tmp
-schroot --chroot=${CHRTNAME} --user=root             --directory=/tmp 
./lmi_setup_20.sh
-schroot --chroot=${CHRTNAME} --user=root             --directory=/tmp 
./lmi_setup_21.sh
-# On a particular corporate server, root is not a sudoer.
-if sudo -l true; then
-  sudo                       --user="${NORMAL_USER}"                  
./lmi_setup_30.sh
-else
-  su                                "${NORMAL_USER}"                  
./lmi_setup_30.sh
-fi
-schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_40.sh
-schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_41.sh
-schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_42.sh
-schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_43.sh
+./lmi_setup_01.sh
 
 # Copy log files that may be useful for tracking down problems with
 # certain commands whose output is voluminous and often uninteresting.
diff --git a/lmi_setup_00c.sh b/lmi_setup_00c.sh
index 59ea148..aad6fd0 100755
--- a/lmi_setup_00c.sh
+++ b/lmi_setup_00c.sh
@@ -29,66 +29,4 @@ set -evx
 assert_su
 assert_not_chrooted
 
-./lmi_setup_05c.sh
-./lmi_setup_07r.sh
-
-# BEGIN ./lmi_setup_09.sh
-# Configure zsh, for root and normal users.
-
-wget -N -nv "${GIT_URL_BASE}"/gwc/.zshrc
-mv .zshrc ~
-cp -a ~/.zshrc /home/"${NORMAL_USER}"/.zshrc
-chown "${NORMAL_USER}":"${NORMAL_GROUP}" /home/"${NORMAL_USER}"/.zshrc
-
-# Configure vim. Rather than trying to split its contents between
-# '~/.vimrc' and '/etc/vim/vimrc.local', use '~/.vimrc' for all
-# customizations and copy that file for the normal user too.
-
-wget -N -nv "${GIT_URL_BASE}"/gwc/.vimrc
-mv .vimrc ~
-cp -a ~/.vimrc /home/"${NORMAL_USER}"/.vimrc
-chown "${NORMAL_USER}":"${NORMAL_GROUP}" /home/"${NORMAL_USER}"/.vimrc
-
-# Without this, 'zg' gives an error message; with it, vim creates a
-# spellfile the first time 'zg' is used, if none already exists.
-mkdir ~/.vim
-mkdir /home/"${NORMAL_USER}"/.vim
-chown "${NORMAL_USER}":"${NORMAL_GROUP}" /home/"${NORMAL_USER}"/.vim
-# It's a much better idea to copy a mature spellfile hither:
-wget -N -nv "${GIT_URL_BASE}"/gwc/.vim/spell/en.utf-8.add
-mkdir ~/.vim/spell
-mv en.utf-8.add ~/.vim/spell/en.utf-8.add
-mkdir /home/"${NORMAL_USER}"/.vim/spell
-chown "${NORMAL_USER}":"${NORMAL_GROUP}" /home/"${NORMAL_USER}"/.vim/spell
-cp -a ~/.vim/spell/en.utf-8.add /home/"${NORMAL_USER}"/.vim/spell/en.utf-8.add
-chown "${NORMAL_USER}":"${NORMAL_GROUP}" 
/home/"${NORMAL_USER}"/.vim/spell/en.utf-8.add
-# and then (imperatively) run this command:
-vim -es -c ':mkspell! ~/.vim/spell/en.utf-8.add' -c ':q'
-# which will be repeated later for the normal user.
-# END   ./lmi_setup_09.sh
-
-./lmi_setup_10r.sh
-./lmi_setup_11.sh
-
-# BEGIN ./lmi_setup_13.sh
-# For caveats, see:
-#    https://lists.nongnu.org/archive/html/lmi/2020-05/msg00040.html
-mkdir -p /srv/cache_for_lmi
-du   -sb /srv/chroot/"${CHRTNAME}"/srv/cache_for_lmi || echo "Okay."
-mkdir -p /srv/chroot/"${CHRTNAME}"/srv/cache_for_lmi
-mount --bind /srv/cache_for_lmi /srv/chroot/"${CHRTNAME}"/srv/cache_for_lmi
-# END   ./lmi_setup_13.sh
-
-cp -a lmi_setup_*.sh /tmp/schroot_env /srv/chroot/${CHRTNAME}/tmp
-schroot --chroot=${CHRTNAME} --user=root             --directory=/tmp 
./lmi_setup_20.sh
-schroot --chroot=${CHRTNAME} --user=root             --directory=/tmp 
./lmi_setup_21.sh
-# On a particular corporate server, root is not a sudoer.
-if sudo -l true; then
-  sudo                       --user="${NORMAL_USER}"                  
./lmi_setup_30.sh
-else
-  su                                "${NORMAL_USER}"                  
./lmi_setup_30.sh
-fi
-schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_40.sh
-schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_41.sh
-schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_42.sh
-schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp 
./lmi_setup_43.sh
+./lmi_setup_01c.sh
diff --git a/lmi_setup_00c.sh b/lmi_setup_01.sh
similarity index 57%
copy from lmi_setup_00c.sh
copy to lmi_setup_01.sh
index 59ea148..33e44c1 100755
--- a/lmi_setup_00c.sh
+++ b/lmi_setup_01.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Create a chroot for cross-building "Let me illustrate..." on centos-7.
+# Create a chroot for cross-building "Let me illustrate...".
 #
 # Copyright (C) 2016, 2017, 2018, 2019, 2020 Gregory W. Chicares.
 #
@@ -29,45 +29,7 @@ set -evx
 assert_su
 assert_not_chrooted
 
-./lmi_setup_05c.sh
-./lmi_setup_07r.sh
-
-# BEGIN ./lmi_setup_09.sh
-# Configure zsh, for root and normal users.
-
-wget -N -nv "${GIT_URL_BASE}"/gwc/.zshrc
-mv .zshrc ~
-cp -a ~/.zshrc /home/"${NORMAL_USER}"/.zshrc
-chown "${NORMAL_USER}":"${NORMAL_GROUP}" /home/"${NORMAL_USER}"/.zshrc
-
-# Configure vim. Rather than trying to split its contents between
-# '~/.vimrc' and '/etc/vim/vimrc.local', use '~/.vimrc' for all
-# customizations and copy that file for the normal user too.
-
-wget -N -nv "${GIT_URL_BASE}"/gwc/.vimrc
-mv .vimrc ~
-cp -a ~/.vimrc /home/"${NORMAL_USER}"/.vimrc
-chown "${NORMAL_USER}":"${NORMAL_GROUP}" /home/"${NORMAL_USER}"/.vimrc
-
-# Without this, 'zg' gives an error message; with it, vim creates a
-# spellfile the first time 'zg' is used, if none already exists.
-mkdir ~/.vim
-mkdir /home/"${NORMAL_USER}"/.vim
-chown "${NORMAL_USER}":"${NORMAL_GROUP}" /home/"${NORMAL_USER}"/.vim
-# It's a much better idea to copy a mature spellfile hither:
-wget -N -nv "${GIT_URL_BASE}"/gwc/.vim/spell/en.utf-8.add
-mkdir ~/.vim/spell
-mv en.utf-8.add ~/.vim/spell/en.utf-8.add
-mkdir /home/"${NORMAL_USER}"/.vim/spell
-chown "${NORMAL_USER}":"${NORMAL_GROUP}" /home/"${NORMAL_USER}"/.vim/spell
-cp -a ~/.vim/spell/en.utf-8.add /home/"${NORMAL_USER}"/.vim/spell/en.utf-8.add
-chown "${NORMAL_USER}":"${NORMAL_GROUP}" 
/home/"${NORMAL_USER}"/.vim/spell/en.utf-8.add
-# and then (imperatively) run this command:
-vim -es -c ':mkspell! ~/.vim/spell/en.utf-8.add' -c ':q'
-# which will be repeated later for the normal user.
-# END   ./lmi_setup_09.sh
-
-./lmi_setup_10r.sh
+./lmi_setup_10.sh
 ./lmi_setup_11.sh
 
 # BEGIN ./lmi_setup_13.sh
diff --git a/lmi_setup_00c.sh b/lmi_setup_01c.sh
similarity index 98%
copy from lmi_setup_00c.sh
copy to lmi_setup_01c.sh
index 59ea148..4ec7429 100755
--- a/lmi_setup_00c.sh
+++ b/lmi_setup_01c.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Create a chroot for cross-building "Let me illustrate..." on centos-7.
+# Create a chroot for cross-building "Let me illustrate...".
 #
 # Copyright (C) 2016, 2017, 2018, 2019, 2020 Gregory W. Chicares.
 #
diff --git a/lmi_setup_00c.sh b/lmi_setup_01r.sh
similarity index 58%
copy from lmi_setup_00c.sh
copy to lmi_setup_01r.sh
index 59ea148..28e1bb0 100755
--- a/lmi_setup_00c.sh
+++ b/lmi_setup_01r.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Create a chroot for cross-building "Let me illustrate..." on centos-7.
+# Create a chroot for cross-building "Let me illustrate...".
 #
 # Copyright (C) 2016, 2017, 2018, 2019, 2020 Gregory W. Chicares.
 #
@@ -29,44 +29,9 @@ set -evx
 assert_su
 assert_not_chrooted
 
-./lmi_setup_05c.sh
+./lmi_setup_02.sh
+./lmi_setup_05r.sh
 ./lmi_setup_07r.sh
-
-# BEGIN ./lmi_setup_09.sh
-# Configure zsh, for root and normal users.
-
-wget -N -nv "${GIT_URL_BASE}"/gwc/.zshrc
-mv .zshrc ~
-cp -a ~/.zshrc /home/"${NORMAL_USER}"/.zshrc
-chown "${NORMAL_USER}":"${NORMAL_GROUP}" /home/"${NORMAL_USER}"/.zshrc
-
-# Configure vim. Rather than trying to split its contents between
-# '~/.vimrc' and '/etc/vim/vimrc.local', use '~/.vimrc' for all
-# customizations and copy that file for the normal user too.
-
-wget -N -nv "${GIT_URL_BASE}"/gwc/.vimrc
-mv .vimrc ~
-cp -a ~/.vimrc /home/"${NORMAL_USER}"/.vimrc
-chown "${NORMAL_USER}":"${NORMAL_GROUP}" /home/"${NORMAL_USER}"/.vimrc
-
-# Without this, 'zg' gives an error message; with it, vim creates a
-# spellfile the first time 'zg' is used, if none already exists.
-mkdir ~/.vim
-mkdir /home/"${NORMAL_USER}"/.vim
-chown "${NORMAL_USER}":"${NORMAL_GROUP}" /home/"${NORMAL_USER}"/.vim
-# It's a much better idea to copy a mature spellfile hither:
-wget -N -nv "${GIT_URL_BASE}"/gwc/.vim/spell/en.utf-8.add
-mkdir ~/.vim/spell
-mv en.utf-8.add ~/.vim/spell/en.utf-8.add
-mkdir /home/"${NORMAL_USER}"/.vim/spell
-chown "${NORMAL_USER}":"${NORMAL_GROUP}" /home/"${NORMAL_USER}"/.vim/spell
-cp -a ~/.vim/spell/en.utf-8.add /home/"${NORMAL_USER}"/.vim/spell/en.utf-8.add
-chown "${NORMAL_USER}":"${NORMAL_GROUP}" 
/home/"${NORMAL_USER}"/.vim/spell/en.utf-8.add
-# and then (imperatively) run this command:
-vim -es -c ':mkspell! ~/.vim/spell/en.utf-8.add' -c ':q'
-# which will be repeated later for the normal user.
-# END   ./lmi_setup_09.sh
-
 ./lmi_setup_10r.sh
 ./lmi_setup_11.sh
 



reply via email to

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