All pastes #288540 Raw Edit

sssslang

public shellscript v1 · immutable
#288540 ·published 2006-12-22 11:38 UTC
rendered paste body
#!/bin/bash#pacget script cachedir=/var/cache/pacman/pkgfile=`echo $1|awk -F '/' '{ print $NF }'` echo Downloading: $file|sed 's,/,,' repo=`echo $1|awk -F '/' '{x=NF-3 } { print  $x }'` echo repo: $repo mirrors=`sed -n 's/^Server = //; s,$,/'"$repo/os/i686/$file"', ; /^ftp/p; /^http/p' /etc/pacget.conf`if [[ $2 = *.db.tar.gz.part || $repo = "testing" ]]; then        echo "(using one mirror)"        mirrors=$1        cachedir=/var/lib/pacmanfi aria2c -t60 -m5 -l /var/log/pacget.log $mirrors -o $file.pacget if [ -f $cachedir/$file.pacget.aria2 ]; then     exit 130 fimv $file.pacget $2