aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-01-01 10:50:11 +0800
committerAaron LI <aly@aaronly.me>2019-01-01 10:50:11 +0800
commit94f3275841b4d025071f7a3e5e2a9cada64ca744 (patch)
treef4a748403c17a43899bf0cd81896f0208dc86643
parent45d244bfe1b75bf57dd2dd68c6e665dc0c4443e9 (diff)
downloaddfly-update-94f3275841b4d025071f7a3e5e2a9cada64ca744.tar.bz2
Add INSTALL_LIST for the list of files/dirs to be installed
-rwxr-xr-xdfly-update44
1 files changed, 24 insertions, 20 deletions
diff --git a/dfly-update b/dfly-update
index 5f872dd..48a8a15 100755
--- a/dfly-update
+++ b/dfly-update
@@ -49,6 +49,29 @@ MNT_DIR="/mnt/${NAME}"
# Backup directory
BACK_DIR="/var/backups/${NAME}"
+# List of files/directories to be installed
+INSTALL_LIST='
+ COPYRIGHT
+ bin
+ boot
+ compat
+ lib
+ libexec
+ rescue
+ sbin
+ usr/Makefile
+ usr/bin
+ usr/games
+ usr/include
+ usr/lib
+ usr/libdata
+ usr/libexec
+ usr/sbin
+ usr/share
+ var/msgs
+ var/yp
+'
+
# Ignored files to be kept from overriding by the upgrade.
FILES_IGNORE='
/boot/loader.conf
@@ -224,26 +247,7 @@ install_system() {
done
echo " => Installing kernel and world ..."
- for item in \
- COPYRIGHT \
- bin \
- boot \
- compat \
- lib \
- libexec \
- rescue \
- sbin \
- usr/Makefile \
- usr/bin \
- usr/games \
- usr/include \
- usr/lib \
- usr/libdata \
- usr/libexec \
- usr/sbin \
- usr/share \
- var/msgs \
- var/yp; do
+ for item in ${INSTALL_LIST}; do
echo -n " * Installing: ${item} ... "
cpdup -o -u ${MNT_DIR}/${item} /${item} || exit ${EC_CPDUP}
echo "ok"