aboutsummaryrefslogtreecommitdiffstats
path: root/dfly-update
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-01-05 23:52:22 +0800
committerAaron LI <aly@aaronly.me>2019-01-05 23:52:22 +0800
commit5f622792533fc26935a781651d009f90b0f22679 (patch)
tree2dea3819cdb55eb418c4c595126a356a50c08061 /dfly-update
parent77e6c23fbac4bbcad19e7c0690485f073c7908dc (diff)
downloaddfly-update-5f622792533fc26935a781651d009f90b0f22679.tar.bz2
Introduce ${CPDUP} to specify the path to cpdup(1)
Diffstat (limited to 'dfly-update')
-rwxr-xr-xdfly-update8
1 files changed, 5 insertions, 3 deletions
diff --git a/dfly-update b/dfly-update
index bfa1107..2f26633 100755
--- a/dfly-update
+++ b/dfly-update
@@ -42,6 +42,8 @@ EC_NOFILE=21
# Default Configurations
#
+# Path to the cpdup(1) executable
+CPDUP="/bin/cpdup"
# Temporary directory to cache the image, etc, ...
CACHE_DIR="/var/tmp/${NAME}"
# Directory to mount the system image
@@ -248,7 +250,7 @@ install_system() {
echo " => Installing kernel and world ..."
for item in ${INSTALL_LIST}; do
echo -n " * Installing: ${item} ... "
- cpdup -o -u ${MNT_DIR}/${item} /${item} || exit ${EC_CPDUP}
+ ${CPDUP} -o -u ${MNT_DIR}/${item} /${item} || exit ${EC_CPDUP}
echo "ok"
done
@@ -273,7 +275,7 @@ upgrade_system() {
[ -d "${CACHE_DIR}" ] || mkdir "${CACHE_DIR}"
echo "Upgrading system ..."
echo " => Coping new /etc to: ${etcdir}"
- cpdup -o -u ${MNT_DIR}/etc.hdd ${etcdir} || exit ${EC_CPDUP}
+ ${CPDUP} -o -u ${MNT_DIR}/etc.hdd ${etcdir} || exit ${EC_CPDUP}
echo " => Removing ignored files ..."
for file_etc in ${FILES_IGNORE}; do
@@ -301,7 +303,7 @@ upgrade_system() {
done
echo " => Installing new configurations ..."
- cpdup -o -u ${etcdir} /etc || exit ${EC_CPDUP}
+ ${CPDUP} -o -u ${etcdir} /etc || exit ${EC_CPDUP}
echo " => DONE!"
rm -rf "${etcdir}"
echo "+---------+"