aboutsummaryrefslogtreecommitdiffstats
path: root/dfly-update
diff options
context:
space:
mode:
Diffstat (limited to 'dfly-update')
-rwxr-xr-xdfly-update3
1 files changed, 2 insertions, 1 deletions
diff --git a/dfly-update b/dfly-update
index d38e1e7..25826a0 100755
--- a/dfly-update
+++ b/dfly-update
@@ -516,8 +516,9 @@ cleanup() {
make -f ${mk_upgrade} -V TO_REMOVE_LATE | tr ' ' '\n' >> ${tmpfile}
# Credit: https://stackoverflow.com/a/10929511
+ # [ -n "${item}" ]: do not ignore the last line if not end with a '\n'
while IFS='' read -r item || [ -n "${item}" ]; do
- if [ -e ${item} -o -L ${item} ]; then
+ if [ -n "${item}" ] && [ -e ${item} -o -L ${item} ]; then
echo " * ${item}"
chflags -Rf noschg ${item}
rm -rf ${item}