diff options
Diffstat (limited to 'pacman2pacman-get')
-rw-r--r-- | pacman2pacman-get | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/pacman2pacman-get b/pacman2pacman-get index 581c793..929b6ca 100644 --- a/pacman2pacman-get +++ b/pacman2pacman-get @@ -29,15 +29,20 @@ shopt -s extglob torrent_folder='/srv/pacman2pacman/torrents' -pkg_cache_location='/var/cache/pacman/pkg' - prog_check_freq=1.4 # seconds to update download progress torrent_search_time=6 # seconds to spend scanning the mirrors for a torrent -# These variables to be moved into a config file -mirrorlist_location="/etc/pacman.d/mirrorlist" -stall_time=60 # if download is still at 0% after this much time, consider download stalled +# Find out the cache location +pkg_cache_location='/var/cache/pacman/pkg' # default location + +if cachesearch=$(grep '^[[:space:]]*CacheDir' /etc/pacman.conf) # uncommented 'CacheDir' +then + pkg_cache_location="${cachesearch##*[[:space:]=]}" # everything before the last space or = +fi + +# Read the config +source /etc/pacman2pacman.conf # Pacman2pacman should be called like this from /etc/pacman.conf: # XferCommand = /usr/bin/pacman2pacman-get %u %o |