Advertisement
devinteske

test.sh

Jul 4th, 2013
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.02 KB | None | 0 0
  1. #!/bin/sh
  2. . /usr/share/bsdconfig/script.subr
  3. ############################################################ CONFIGURATION
  4. #debug=1
  5. nonInteractive=1
  6.  
  7. #
  8. # Do what?
  9. #
  10. #packages_to_fetch="beav-1.40.18_1"
  11. # or
  12. packages_to_add="beav-1.40.18_1"
  13.  
  14. ############################################################ SCRIPT
  15.  
  16. # For downloading stuff...
  17. if [ "$packages_to_fetch" ]; then
  18.         _ftpPath=ftp://ftp-archive.freebsd.org
  19.         mediaSetFTP
  20.         mediaOpen
  21.         for pkg in $packages_to_fetch; do
  22.                 f_device_get media packages/All/$pkg.tbz \
  23.                                  > /tmp/packages/All/$pkg.tbz
  24.         done
  25. elif [ "$packages_to_add" ]; then
  26.         _directoryPath=/tmp
  27.         mediaSetDirectory
  28.         for pkg in $packages_to_add; do
  29.                 f_mustberoot_init
  30.                 f_package_add $pkg
  31.         done
  32. fi
  33.  
  34. ###############################################################################
  35. # END
  36. ###############################################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement