summaryrefslogtreecommitdiff
path: root/db-sync
diff options
context:
space:
mode:
Diffstat (limited to 'db-sync')
-rwxr-xr-xdb-sync20
1 files changed, 10 insertions, 10 deletions
diff --git a/db-sync b/db-sync
index 06161a2..dde21e3 100755
--- a/db-sync
+++ b/db-sync
@@ -19,8 +19,8 @@ VERBOSE=${V}
extra=()
${VERBOSE} && extra+=(-v)
-WORKDIR=$(mktemp -dt "${0##*/}.XXXXXXXXXX")
-trap "rm -rf -- $(printf '%q' "${WORKDIR}")" EXIT
+work_directory=$(mktemp -dt "${0##*/}.XXXXXXXXXX")
+trap "rm -rf -- $(printf '%q' "${work_directory}")" EXIT
# Returns contents of a repo
get_repos() {
@@ -32,7 +32,7 @@ get_repos() {
--include="*${files_extension_suffixfile}" \
--exclude="*" \
--delete-after \
- "rsync://${mirror}/${mirrorpath}/" "$WORKDIR"
+ "rsync://${mirror}/${mirror_path}/" "${work_directory}"
}
get_repo_content() {
@@ -44,13 +44,13 @@ get_repo_content() {
# Prints blacklisted packages
get_blacklist() {
- cut -d ':' -f 1 "${BLACKLIST_FILE}"
+ cut -d ':' -f 1 "${blacklist_file}"
}
# repo
# arch
get_repo_file() {
- echo "${WORKDIR}/${1}/os/${2}/${1}"
+ echo "${work_directory}/${1}/os/${2}/${1}"
}
# Process the databases and get the libre packages
@@ -116,7 +116,7 @@ init() {
--delay-updates \
--include-from="/tmp/${_repo}-${_arch}.whitelist" \
--exclude="*" \
- "rsync://${mirror}/${mirrorpath}/${_repo}/os/${_arch}/" \
+ "rsync://${mirror}/${mirror_path}/${_repo}/os/${_arch}/" \
"${root_dir}/${_repo}/os/${_arch}/"
# Add a new whitelist
@@ -126,7 +126,7 @@ init() {
rsync "${extra[@]}" --no-motd -rtlH \
--delay-updates \
--safe-links \
- "${WORKDIR}/${_repo}/os/${_arch}/" \
+ "${work_directory}/${_repo}/os/${_arch}/" \
"${root_dir}/${_repo}/os/${_arch}/"
# Cleanup
@@ -151,7 +151,7 @@ init() {
--safe-links \
--include-from=/tmp/any.whitelist \
--exclude="*" \
- "rsync://${mirror}/${mirrorpath}/${pkgpool}/" \
+ "rsync://${mirror}/${mirror_path}/${pkgpool}/" \
"${root_dir}/${pkgpool}/"
done
@@ -170,7 +170,7 @@ init() {
--safe-links \
--include-from=/tmp/any.whitelist \
--exclude="*" \
- "rsync://${mirror}/${mirrorpath}/${srcpool}/" \
+ "rsync://${mirror}/${mirror_path}/${srcpool}/" \
"${root_dir}/${srcpool}/"
done
@@ -192,7 +192,7 @@ source "$(dirname "$(readlink -e "$0")")/config"
source "$(dirname "$(readlink -e "$0")")/db-libremessages"
# Check variables presence
-for var in database_extension_suffixfile files_extension_suffixfile mirror mirrorpath WORKDIR BLACKLIST_FILE root_dir ARCHSRCPOOLS ARCHPKGPOOLS; do
+for var in database_extension_suffixfile files_extension_suffixfile mirror mirror_path work_directory blacklist_file root_dir ARCHSRCPOOLS ARCHPKGPOOLS; do
test -z "${!var}" && fatal_error "Empty %s" "${var}"
done