index : archiso32 | |
Archlinux32 iso tools | gitolite user |
summaryrefslogtreecommitdiff |
author | chandan <cks071g2@gmail.com> | 2009-08-31 16:11:58 +0530 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2009-09-01 09:29:41 -0700 |
commit | 195521a1856f04d5915f894115c820a789db29bc (patch) | |
tree | 2f13f121908269137936f87c9e8072f483ea6195 /configs/install-iso | |
parent | bbc0f720c5f180c949ff49285de0533402644ea4 (diff) |
-rwxr-xr-x | configs/install-iso/download-repo.sh | 8 |
diff --git a/configs/install-iso/download-repo.sh b/configs/install-iso/download-repo.sh index c32beab..ead5a44 100755 --- a/configs/install-iso/download-repo.sh +++ b/configs/install-iso/download-repo.sh @@ -40,10 +40,16 @@ PKGS=$(/usr/bin/pacman -Sl $REPO | cut -d' ' -f1,2 | tr ' ' '/') if [ -n "$PKGS" ]; then baseurl="" + cachedir="/var/cache/pacman/pkg" for url in $(/usr/bin/pacman -Sp $PKGS | grep '://'); do baseurl="$(dirname "$url")" #save for later pkgname="$(basename "$url")" - wget -nv "$url" -O "$DEST/$pkgname" + cachedpkg="$cachedir/$pkgname" + if [ -e "$cachedpkg" ]; then + cp "$cachedpkg" "$DEST/$pkgname" + else + wget -nv "$url" -O "$DEST/$pkgname" + fi done wget -nv "$baseurl/$REPO.db.tar.gz" -O "$DEST/$REPO.db.tar.gz" else |