# Apt-file configuration file # Substitutions are made as follow: # host => remote hostname # port => port # uri => complete URI from sources.list # path => path from / # dist => the distrib name # comp => the component name # cache => path to the cache dir # dest => the destination file name # cdrom => cdrom mount point # Where are located Packages (relative to directory) destination = __dists__Contents-.gz # Fetch methods using curl #http = curl -I "/dists//Contents-.gz" 2>&1 | grep '^HTTP.*404' > /dev/null || (curl -z "/" -R -o "/" "/dists//Contents-.gz" && chmod 644 "/") #ftp = curl --ftp-pasv -I "/dists//Contents-.gz" 2>&1 | grep '^Content-Length:' > /dev/null && (curl --ftp-pasv -z "/" -R -o "/" "/dists//Contents-.gz" && chmod 644 "/") # Fetch methods using wget http = (if [ -f "/" ]; then mv "/" "/Contents-.gz"; fi; wget -N -P "" "/dists//Contents-.gz" 2>&1 && mv "/Contents-.gz" "/" || rm -f "/") | grep -v -e "^--" -e "=>" -e "^Length:" -e "^HTTP" -e "^Resolving" -e "^Connecting" -e "ERROR 404" 1>&2 ftp = (if [ -f "/" ]; then mv "/" "/Contents-.gz"; fi; wget -N --passive-ftp -P "" "/dists//Contents-.gz" 2>&1 && mv "/Contents-.gz" "/" || rm -f "/") | grep -v -e "^--" -e "=>" -e "^Length:" -e "^Resolving" -e "^Connecting" -e "^Logging in as" -e "Removed " -e "^No such file" -e "apt/[.]listing" -e "0K " 1>&2 ssh = scp -l -P "://dists//Contents-.gz" "/" && chmod 644 "/" rsh = rcp -l "://dists//Contents-.gz" "/" && chmod 644 "/" file = cp "//dists//Contents-.gz" "/" && chmod 644 "/" copy = cp "//dists//Contents-.gz" "/" && chmod 644 "/" cdrom = echo "Put CDROM labeled in the cdrom device" > /dev/stderr ; read ; mount ""; cp "/dists//Contents-.gz" "/" && chmod 644 "/"; umount ""