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/db.sh') diff --git a/lib/db.sh b/lib/db.sh index 6dc15fa..e2f8fb7 100644 --- a/lib/db.sh +++ b/lib/db.sh @@ -33,7 +33,7 @@ db_get_srcver() local source="${3}" local dir= - dir="${opt_base_dir}/feeds/${chan}/${dist}/.db" + dir="${base_dir}/feeds/${chan}/${dist}/.db" dir="${dir}/$(hash_name "${source}")/${source}" if [ -f "${dir}/srcver" ]; then cat "${dir}/srcver" @@ -50,7 +50,7 @@ db_set_srcver() local srcver="${4}" local dir= - dir="${opt_base_dir}/feeds/${chan}/${dist}/.db" + dir="${base_dir}/feeds/${chan}/${dist}/.db" dir="${dir}/$(hash_name "${source}")/${source}" mkdir -p "${dir}" printf '%s\n' "${srcver}" >"${dir}/srcver" @@ -65,7 +65,7 @@ db_del_srcver() local source="${3}" local dir= - dir="${opt_base_dir}/feeds/${chan}/${dist}/.db" + dir="${base_dir}/feeds/${chan}/${dist}/.db" dir="${dir}/$(hash_name "${source}")/${source}" rm -f "${dir}/srcver" # Remove ".../.db//". @@ -87,7 +87,7 @@ db_get_binver() local source="${5}" local dir= - dir="${opt_base_dir}/feeds/${chan}/${dist}/.db" + dir="${base_dir}/feeds/${chan}/${dist}/.db" dir="${dir}/$(hash_name "${source}")/${source}/${arch}_${plat}" if [ -f "${dir}/binver" ]; then cat "${dir}/binver" @@ -106,7 +106,7 @@ db_set_binver() local binver="${6}" local dir= - dir="${opt_base_dir}/feeds/${chan}/${dist}/.db" + dir="${base_dir}/feeds/${chan}/${dist}/.db" dir="${dir}/$(hash_name "${source}")/${source}/${arch}_${plat}" mkdir -p "${dir}" printf '%s\n' "${binver}" >"${dir}/binver" @@ -123,7 +123,7 @@ db_del_binver() local source="${5}" local dir= - dir="${opt_base_dir}/feeds/${chan}/${dist}/.db" + dir="${base_dir}/feeds/${chan}/${dist}/.db" dir="${dir}/$(hash_name "${source}")/${source}/${arch}_${plat}" rm -f "${dir}/binver" # Remove ".../.db///_". @@ -141,7 +141,7 @@ db_foreach_source() shift 3 - dir="${opt_base_dir}/feeds/${chan}/${dist}/.db" + dir="${base_dir}/feeds/${chan}/${dist}/.db" # For each hash: for dir in "${dir}/"*/; do if [ ! -d "${dir}" ]; then @@ -168,7 +168,7 @@ db_get_archplats() local source="${3}" local dir= - dir="${opt_base_dir}/feeds/${chan}/${dist}/.db" + dir="${base_dir}/feeds/${chan}/${dist}/.db" dir="${dir}/$(hash_name "${source}")/${source}" for dir in "${dir}/"*_*/; do if [ ! -d "${dir}" ]; then @@ -194,7 +194,7 @@ db_get_packages() local binver="${4}" local dir= - dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db" + dir="${base_dir}/pool/$(hash_name "${source}")/${source}/.db" dir="${dir}/${binver}_${arch}_${plat}" if [ -f "${dir}/packages" ]; then cat "${dir}/packages" @@ -214,7 +214,7 @@ db_add_package() local pkg="${7}" local dir= - dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db" + dir="${base_dir}/pool/$(hash_name "${source}")/${source}/.db" dir="${dir}/${binver}_${arch}_${plat}" mkdir -p "${dir}" printf '%s %s %s\n' "${size}" "${sect}" "${pkg}" >>"${dir}/packages" @@ -230,7 +230,7 @@ db_del_packages() local binver="${4}" local dir= - dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db" + dir="${base_dir}/pool/$(hash_name "${source}")/${source}/.db" dir="${dir}/${binver}_${arch}_${plat}" rm -f "${dir}/packages" # Remove "pool///.db/__". @@ -250,7 +250,7 @@ db_inc_references() local dir= local refs= - dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db" + dir="${base_dir}/pool/$(hash_name "${source}")/${source}/.db" dir="${dir}/${binver}_${arch}_${plat}" if [ -f "${dir}/references" ]; then refs="$(cat "${dir}/references")" @@ -274,7 +274,7 @@ db_dec_references() local dir= local refs= - dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db" + dir="${base_dir}/pool/$(hash_name "${source}")/${source}/.db" dir="${dir}/${binver}_${arch}_${plat}" if [ -f "${dir}/references" ]; then refs="$(cat "${dir}/references")" -- cgit v0.9.1