aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2021-03-25 11:17:41 -0500
committerWilliam Harrington <kb0iic@berzerkula.org>2021-03-25 11:17:41 -0500
commit26ea60dac803ce9526f7f73dbd2866b06680d5d7 (patch)
tree754c9735b268d91a731a01eb48627284be222959
parent89a12d1e4dc4fddf6ea4f3be84310cb789d0bc09 (diff)
Change case of FILE to lower case file and rename DIRS to directories.
-rw-r--r--chapter7/backup.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/chapter7/backup.sh b/chapter7/backup.sh
index 71ad3a0..8cba32d 100644
--- a/chapter7/backup.sh
+++ b/chapter7/backup.sh
@@ -1,15 +1,15 @@
#!/bin/bash
-FILE="${LFS_VER}-ch7-backup.tar.xz"
-DIRS=(bin dev etc lib lib64 proc run sbin sources sys tools usr var)
+file="${LFS_VER}-ch7-backup.tar.xz"
+directories=(bin dev etc lib lib64 proc run sbin sources sys tools usr var)
if [ -f "${LFS}/sources/chapter7/backup" ]; then
echo -e "${YLW}Chapter 7 ${GRN}Backup found. Remove manually to backup again.${RST}"
else
- echo -ne "${GRN}Backing up ${YLW}${LFS}${GRN} to ${YLW}${FILE}${RST}... "
+ echo -ne "${GRN}Backing up ${YLW}${LFS}${GRN} to ${YLW}${file}${RST}... "
pushd "${LFS}" > /dev/null || exit 1
- sudo XZ_OPTS="-T${NUMPROCS} -e" tar cJpf "${HOME}"/"${FILE}" "${DIRS[@]}" & pid=$!
+ sudo XZ_OPTS="-T${NUMPROCS} -e" tar cJpf "${HOME}"/"${file}" "${directories[@]}" & pid=$!
spinner "$pid"
retval=$?
if [ "$retval" -ne 0 ]; then
@@ -22,3 +22,4 @@ else
touch "${LFS}/sources/chapter7/backup"
fi
+unset file directories