diff options
Diffstat (limited to 'db-sync')
-rwxr-xr-x | db-sync | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -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 |