From dcb06b94399279fa6ccc09cfda5451bc267a9b57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?coadde=20=5BM=C3=A1rcio=20Alexandre=20Silva=20Delgado=5D?= Date: Wed, 23 Sep 2015 19:38:42 -0300 Subject: rename more variables --- db-sync | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'db-sync') 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 -- cgit v1.2.3-2-g168b