Advertisement
devinteske

browse_packages.sh

Jul 4th, 2013
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.45 KB | None | 0 0
  1. #!/bin/sh
  2. . /usr/share/bsdconfig/script.subr
  3. nonInteractive=1
  4. TMPDIR=/tmp
  5. if [ ! -e "$TMPDIR/packages/INDEX" ]; then
  6.     [ -d "$TMPDIR/packages" ] || mkdir -p "$TMPDIR/packages" || exit 1
  7.     _ftpPath=ftp://ftp-archive.freebsd.org
  8.     mediaSetFTP
  9.     mediaOpen
  10.     f_show_info "Downloading packages/INDEX from %s" "$_ftpPath"
  11.     f_device_get media packages/INDEX > $TMPDIR/packages/INDEX
  12.     mediaClose
  13. fi
  14. _directoryPath=$TMPDIR
  15. mediaSetDirectory
  16. configPackages
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement