diff options
author | P. J. McDermott <pjm@nac.net> | 2013-07-27 15:27:22 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2013-07-27 15:27:22 (EDT) |
commit | fbd4f8999b89af979a233f554b7ee7ab71c3800d (patch) | |
tree | d0193e3c514867fb9b0ce146647ba1575cbb5530 | |
parent | 921b0f76ec1e67f306877465356b324b771d7f3d (diff) |
update_feeds(): Verify expansion of pathname.
-rw-r--r-- | lib/index.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/index.sh b/lib/index.sh index 0320f75..289cb78 100644 --- a/lib/index.sh +++ b/lib/index.sh @@ -97,15 +97,27 @@ update_feeds() # For each suite: for suite_dirent in "${archive}/feeds/.db/"*_*/; do + if [ ! -d "${suite_dirent}" ]; then + continue + fi # For each archplat: for archplat_dirent in "${suite_dirent}/"*_*/; do + if [ ! -d "${archplat_dirent}" ]; then + continue + fi # For each section: for sect_direct in "${archplat_dirent}/"*/; do + if [ ! -d "${sect_dirent}" ]; then + continue + fi # Get the feed path from the index path. feed="$(printf '%s\n' "${sect_dirent}" | \ sed "${script}")" # For each package name hash: for hash_dirent in "${sect_dirent}/"*; do + if [ ! -d "${hash_dirent}" ]; then + continue + fi idx="${feed}/.db/${hash_dirent##*/}" # Ensure there are still packages here. if [ -d "${idx}/info" ]; then |