From 7bda53cd534ee6b6604367cd4c2a45376d41c7df Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 12 Oct 2013 17:30:07 -0400 Subject: Replace ${opt_base_dir} with ${base_dir}. --- (limited to 'lib/index.sh') diff --git a/lib/index.sh b/lib/index.sh index 4ff674c..808431a 100644 --- a/lib/index.sh +++ b/lib/index.sh @@ -39,18 +39,18 @@ feed_add_package() pkg_hash="$(hash_name "${pkg}")" # Add package metadata to feed hash index. - feed_hash_idx="${opt_base_dir}/feeds/${chan}/${dist}/${arch}/${plat}" + feed_hash_idx="${base_dir}/feeds/${chan}/${dist}/${arch}/${plat}" feed_hash_idx="${feed_hash_idx}/${sect}/.db/${pkg_hash}" mkdir -p "${feed_hash_idx}/info" - tar -xzOf "${opt_base_dir}/${file}" 'control.tar.gz' | \ + tar -xzOf "${base_dir}/${file}" 'control.tar.gz' | \ tar -xzO './control' >"${feed_hash_idx}/info/${pkg}.control" printf 'Filename: %s\nSize: %s\nMD5sum: %s\n\n' \ "../../../../../../${file}" "${size}" \ - "$(md5sum "${opt_base_dir}/${file}" | sed 's/ .*$//')" \ + "$(md5sum "${base_dir}/${file}" | sed 's/ .*$//')" \ >>"${feed_hash_idx}/info/${pkg}.control" # Mark feed index fragment as outdated. - old_dir="${opt_base_dir}/feeds/.db/${chan}_${dist}/${arch}_${plat}" + old_dir="${base_dir}/feeds/.db/${chan}_${dist}/${arch}_${plat}" old_dir="${old_dir}/${sect}" mkdir -p "${old_dir}" >"${old_dir}/${pkg_hash}" @@ -73,13 +73,13 @@ feed_remove_package() pkg_hash="$(hash_name "${pkg}")" # Remove package metadata from feed hash index. - feed_hash_idx="${opt_base_dir}/feeds/${chan}/${dist}/${arch}/${plat}" + 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" # Mark feed index fragment as outdated. - old_dir="${opt_base_dir}/feeds/.db/${chan}_${dist}/${arch}_${plat}" + old_dir="${base_dir}/feeds/.db/${chan}_${dist}/${arch}_${plat}" old_dir="${old_dir}/${sect}" mkdir -p "${old_dir}" >"${old_dir}/${pkg_hash}" @@ -103,7 +103,7 @@ update_feeds() local idx= # For each suite: - for suite_dirent in "${opt_base_dir}/feeds/.db/"*_*/; do + for suite_dirent in "${base_dir}/feeds/.db/"*_*/; do if [ ! -d "${suite_dirent}" ]; then continue fi @@ -111,7 +111,7 @@ update_feeds() chan="${chan##*/}" dist="${chan##*_}" chan="${chan%_*}" - suite="${opt_base_dir}/feeds/${chan}/${dist}" + suite="${base_dir}/feeds/${chan}/${dist}" # For each archplat: for archplat_dirent in "${suite_dirent}/"*_*/; do if [ ! -d "${archplat_dirent}" ]; then -- cgit v0.9.1