summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-04-13 01:35:01 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-04-13 01:35:01 (EDT)
commitdad62a66102a5f35968c694200cad3a20da14dce (patch)
tree95116a7dc61fbe6b0d34abefcd1baf849dfaac85 /src
parent58daff309a0b0c88bcf583ff971412667b88b83b (diff)
Add "|| :" after try_rmdir() calls
Diffstat (limited to 'src')
-rw-r--r--src/db.sh2
-rw-r--r--src/garbage.sh2
-rw-r--r--src/index.sh8
3 files changed, 6 insertions, 6 deletions
diff --git a/src/db.sh b/src/db.sh
index 703dca0..4069621 100644
--- a/src/db.sh
+++ b/src/db.sh
@@ -243,7 +243,7 @@ db_del_packages()
# Remove "pool/<hash>/<source>/.db/<binver>_<arch>_<plat>".
rmdir "${dir}"
# Try to remove "pool/<hash>/<source>/.db".
- try_rmdir "${dir%/*}"
+ try_rmdir "${dir%/*}" || :
return 0
}
diff --git a/src/garbage.sh b/src/garbage.sh
index 2975b7a..575cc5d 100644
--- a/src/garbage.sh
+++ b/src/garbage.sh
@@ -63,7 +63,7 @@ collect_garbage()
rm -f "${base_dir}/${file}"
while [ ${dirs} -gt 0 ]; do
file="${file%/*}"
- try_rmdir "${base_dir}/${file}"
+ try_rmdir "${base_dir}/${file}" || :
dirs=$((${dirs} - 1))
done
done <"${garbage}"
diff --git a/src/index.sh b/src/index.sh
index 6246f85..df6d1ff 100644
--- a/src/index.sh
+++ b/src/index.sh
@@ -103,7 +103,7 @@ feed_remove_package()
feed_hash_idx="${base_dir}/feeds/${chan}/${dist}/${arch}/${plat}"
feed_hash_idx="${feed_hash_idx}/${sect}/.db/${pkg_hash}"
rm -f "${feed_hash_idx}/info/${pkg}.control"
- try_rmdir "${feed_hash_idx}/info"
+ try_rmdir "${feed_hash_idx}/info" || :
# Mark feed index fragment as outdated.
old_dir="${base_dir}/feeds/.db/${chan}_${dist}/${arch}_${plat}"
@@ -199,11 +199,11 @@ update_feeds()
"${sect}/Packages.gz"
fi
rmdir "${sect_dirent}"
- try_rmdir "${sect}"
+ try_rmdir "${sect}" || :
done
rmdir "${archplat_dirent}"
- try_rmdir "${archplat}"
- try_rmdir "${archplat%/*}"
+ try_rmdir "${archplat}" || :
+ try_rmdir "${archplat%/*}" || :
done
rmdir "${suite_dirent}"
exec 3>&-