diff options
author | P. J. McDermott <pjm@nac.net> | 2013-07-27 15:35:13 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2013-07-27 15:35:13 (EDT) |
commit | 4d7467f8db2e03f4a8962647855995f76986bb4c (patch) | |
tree | ed081d49824e7647af950d3589a35b8b18f8bf5a /lib | |
parent | 484d4567745b77eb0d993202dfce730416e3fb40 (diff) |
lib/db.sh: s/archive/opt_base_dir/.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/db.sh | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -30,7 +30,7 @@ db_get_srcver() local source="${3}" local dir= - dir="${archive}/feeds/${chan}/${dist}/.db" + dir="${opt_base_dir}/feeds/${chan}/${dist}/.db" dir="${dir}/$(hash_name "${source}")/${source}" if [ -f "${dir}/srcver" ]; then cat "${dir}/srcver" @@ -47,7 +47,7 @@ db_set_srcver() local srcver="${4}" local dir= - dir="${archive}/feeds/${chan}/${dist}/.db" + dir="${opt_base_dir}/feeds/${chan}/${dist}/.db" dir="${dir}/$(hash_name "${source}")/${source}" mkdir -p "${dir}" printf '%s\n' "${srcver}" >"${dir}/srcver" @@ -62,7 +62,7 @@ db_del_srcver() local source="${3}" local dir= - dir="${archive}/feeds/${chan}/${dist}/.db" + dir="${opt_base_dir}/feeds/${chan}/${dist}/.db" dir="${dir}/$(hash_name "${source}")/${source}" rm -f "${dir}/srcver" # Remove ".../.db/<hash>/<source>". @@ -84,7 +84,7 @@ db_get_binver() local source="${5}" local dir= - dir="${archive}/feeds/${chan}/${dist}/.db" + dir="${opt_base_dir}/feeds/${chan}/${dist}/.db" dir="${dir}/$(hash_name "${source}")/${source}/${plat}_${arch}" if [ -f "${dir}/binver" ]; then cat "${dir}/binver" @@ -103,7 +103,7 @@ db_set_binver() local binver="${6}" local dir= - dir="${archive}/feeds/${chan}/${dist}/.db" + dir="${opt_base_dir}/feeds/${chan}/${dist}/.db" dir="${dir}/$(hash_name "${source}")/${source}/${plat}_${arch}" mkdir -p "${dir}" printf '%s\n' "${binver}" >"${dir}/binver" @@ -120,7 +120,7 @@ db_del_binver() local source="${5}" local dir= - dir="${archive}/feeds/${chan}/${dist}/.db" + dir="${opt_base_dir}/feeds/${chan}/${dist}/.db" dir="${dir}/$(hash_name "${source}")/${source}/${plat}_${arch}" rm -f "${dir}/binver" # Remove ".../.db/<hash>/<source>/<plat>_<arch>". @@ -136,7 +136,7 @@ db_get_archplats() local source="${3}" local dir= - dir="${archive}/feeds/${chan}/${dist}/.db" + dir="${opt_base_dir}/feeds/${chan}/${dist}/.db" dir="${dir}/$(hash_name "${source}")/${source}" for dir in "${dir}/"*_*/; do dir="${dir%/}" @@ -159,7 +159,7 @@ db_get_packages() local binver="${4}" local dir= - dir="${archive}/pool/$(hash_name "${source}")/${source}/.db" + dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db" dir="${dir}/${binver}_${arch}_${plat}" if [ -f "${dir}/packages" ]; then cat "${dir}/packages" @@ -178,7 +178,7 @@ db_add_package() local pkg="${6}" local dir= - dir="${archive}/pool/$(hash_name "${source}")/${source}/.db" + dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db" dir="${dir}/${binver}_${arch}_${plat}" printf '%s %s\n' "${sect}" "${pkg}" >>"${dir}/packages" @@ -193,7 +193,7 @@ db_del_packages() local binver="${4}" local dir= - dir="${archive}/pool/$(hash_name "${source}")/${source}/.db" + dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db" dir="${dir}/${binver}_${arch}_${plat}" rm -f "${dir}/packages" # Remove "pool/<hash>/<source>/.db/<binver>_<arch>_<plat>". @@ -213,7 +213,7 @@ db_inc_references() local dir= local refs= - dir="${archive}/pool/$(hash_name "${source}")/${source}/.db" + dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db" dir="${dir}/${binver}_${arch}_${plat}" refs="$(cat "${dir}/references")" refs=$(($refs + 1)) @@ -232,7 +232,7 @@ db_dec_references() local dir= local refs= - dir="${archive}/pool/$(hash_name "${source}")/${source}/.db" + dir="${opt_base_dir}/pool/$(hash_name "${source}")/${source}/.db" dir="${dir}/${binver}_${arch}_${plat}" refs="$(cat "${dir}/references")" refs=$(($refs - 1)) |