diff options
Diffstat (limited to 'db-sync')
-rwxr-xr-x | db-sync | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -21,7 +21,7 @@ ${VERBOSE} && extra="-v" # Returns contents of a repo get_repos() { - mkdir -p ${TMPDIR}/$0.$$.cache + mkdir -p ${TMPDIR}/${0##*/}.$$.cache # Exclude everything but db files rsync ${extra} -mrtlH --no-p --include="*/" \ --include="*.db" \ @@ -30,7 +30,7 @@ get_repos() { --include="*${FILESEXT}" \ --exclude="*" \ --delete-after \ - rsync://${mirror}/${mirrorpath}/ ${TMPDIR}/$0.$$.cache + rsync://${mirror}/${mirrorpath}/ ${TMPDIR}/${0##*/}.$$.cache } get_repo_content() { @@ -48,7 +48,7 @@ get_blacklist() { # repo # arch get_repo_file() { - echo "${TMPDIR}/$0.$$.cache/${1}/os/${2}/${1}" + echo "${TMPDIR}/${0##*/}.$$.cache/${1}/os/${2}/${1}" } # Process the databases and get the libre packages @@ -118,7 +118,7 @@ init() { rsync ${extra} -rtlH \ --delay-updates \ --safe-links \ - ${TMPDIR}/$0.$$.cache/${_repo}/os/${_arch}/ \ + ${TMPDIR}/${0##*/}.$$.cache/${_repo}/os/${_arch}/ \ ${FTP_BASE}/${_repo}/os/${_arch}/ # Cleanup @@ -176,9 +176,9 @@ trap_exit() { } -source $(dirname $0)/config -source $(dirname $0)/local_config -source $(dirname $0)/libremessages +source "$(dirname "$(readlink -e "$0")")/config" +source "$(dirname "$(readlink -e "$0")")/local_config" +source "$(dirname "$(readlink -e "$0")")/libremessages" # From makepkg set -E @@ -189,4 +189,4 @@ trap 'trap_exit "$(gettext "An unknown error has occurred. Exiting...")"' ERR init -rm -r ${TMPDIR}/$0.$$.cache +rm -r ${TMPDIR}/${0##*/}.$$.cache |