[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 90411ba 06/18: Use a variable to reduce liter
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 90411ba 06/18: Use a variable to reduce literal repetition |
Date: |
Thu, 21 May 2020 19:43:11 -0400 (EDT) |
branch: master
commit 90411ba6ba3e80594342943b6e9b93ea9ae09352
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Use a variable to reduce literal repetition
---
install_centos.sh | 5 +++--
install_redhat.sh | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/install_centos.sh b/install_centos.sh
index f0ccb62..31439f2 100755
--- a/install_centos.sh
+++ b/install_centos.sh
@@ -120,10 +120,11 @@ mount --rbind /var/cache/centos_lmi
/srv/chroot/centos7lmi/var/cache/yum
echo Installed centos chroot.
-mkdir -p /var/cache/"${CODENAME}"
+CACHEDIR=/var/cache/"${CODENAME}"
+mkdir -p "${CACHEDIR}"
du -sb
/srv/chroot/centos7lmi/srv/chroot/"${CHRTNAME}"/var/cache/apt/archives || echo
"Okay."
mkdir -p /srv/chroot/centos7lmi/srv/chroot/"${CHRTNAME}"/var/cache/apt/archives
-mount --bind /var/cache/"${CODENAME}"
/srv/chroot/centos7lmi/srv/chroot/"${CHRTNAME}"/var/cache/apt/archives
+mount --bind "${CACHEDIR}"
/srv/chroot/centos7lmi/srv/chroot/"${CHRTNAME}"/var/cache/apt/archives
cp -a /tmp/schroot_env /srv/chroot/centos7lmi/tmp
cp -a lmi_setup_*.sh /srv/chroot/centos7lmi/tmp
diff --git a/install_redhat.sh b/install_redhat.sh
index 67295fa..a53bf1e 100755
--- a/install_redhat.sh
+++ b/install_redhat.sh
@@ -95,10 +95,11 @@ yum --assumeyes install debootstrap schroot
# ./lmi_setup_10.sh
# BEGIN ./lmi_setup_11.sh
-mkdir -p /var/cache/"${CODENAME}"
+CACHEDIR=/var/cache/"${CODENAME}"
+mkdir -p "${CACHEDIR}"
du -sb /srv/chroot/"${CHRTNAME}"/var/cache/apt/archives || echo "Okay."
mkdir -p /srv/chroot/"${CHRTNAME}"/var/cache/apt/archives
-mount --bind /var/cache/"${CODENAME}"
/srv/chroot/"${CHRTNAME}"/var/cache/apt/archives
+mount --bind "${CACHEDIR}" /srv/chroot/"${CHRTNAME}"/var/cache/apt/archives
# Install a debian chroot inside this redhat chroot.
mkdir -p /srv/chroot/"${CHRTNAME}"
- [lmi-commits] [lmi] master updated (71eeb9b -> 8bc4085), Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master 932c27b 01/18: Consolidate chroot step #10, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master 8d2c26b 03/18: Fold unborn chroot step #12 into step #20, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master 90411ba 06/18: Use a variable to reduce literal repetition,
Greg Chicares <=
- [lmi-commits] [lmi] master 8054eeb 09/18: Don't create chroot's own /var before running debootstrap, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master 2b00752 10/18: Note some questions for later investigation, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master 7f0f5fa 04/18: Announce the installation of each chroot, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master 5134131 02/18: Rearrange some independent script blocks, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master a779e6f 05/18: Give all group users access to chroot, on debian host, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master bfd3dae 07/18: Regularize debootstrap invocations, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master 0d9cf29 08/18: Clarify documentation, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master 455d59e 11/18: Rearrange some script blocks, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master 4a7d356 12/18: Extract marked blocks into sub-scripts #11, Greg Chicares, 2020/05/21
- [lmi-commits] [lmi] master 294b7bb 13/18: Let certain commands fail for the moment, Greg Chicares, 2020/05/21