#!/bin/ksh #h #h setup_gnu - fetches and installs VOL & pkgadd packages on osr5/osr6 #h Version: 2.3 #h #h usage: #h #h ./setup_gnu #h ./setup_gnu help #h ./setup_gnu -h #h displays this help text #h #h ./setup_gnu list #h lists all the packages available from the skunkware site #h names are shown the same way they should be used on setup_gnu command-lines #h (you can cut & paste the names to make a valid setup_gnu command-line) #h #h ./setup_gnu wget #h special case that just installs the latest version of wget if there is not #h any version installed already. setup_gnu always does this anyways before #h doing anything else, since it uses wget internally to download the packages #h you asked for. This is just a way to get wget installed without having to get #h anything else. #h #h ./setup_gnu #h installs VOLs and/or pkgadds from an ftp or http url #h url may point to: #h a VOL.000.000 or pkgadd file (even if it's not named that way) #h a directory of VOL.* or pkgadd files #h a tar of VOL.* or pkgadd files #h a compressed tar of VOL.* or pkgadd files (compress, gzip, bzip2) #h #h some examples: #h #h install the latest version of "ImageMagick" #h ./setup_gnu `./setup_gnu list |grep "^ImageMagick-" |tail -1` #h #h note, the above trick for finding the latest version would not work #h for all packages because the "sort -n" used by the "list" option is not #h smart enough to handle the way some packages are named. "Eterm" and "prngd" #h are examples of packages whose version numbers would not sort correctly. #h so generally you want to do two steps, first list the available names: #h ./setup_gnu list |grep prngd #h then decide which one is the right one, and then specify it explicitly: #h ./setup_gnu prngd-0.9.23 #h #h two examples of simple, single VOL files #h ./setup_gnu ftp://ftp.sco.com/pub/openserver5/oss642a #h ./setup_gnu ftp://ftp.sco.com/pub/openserver5/oss497c #h #h two examples of directories with VOL files #h ./setup_gnu ftp://ftp.sco.com/pub/openserver5/oss640a/VOL.* #h ./setup_gnu ftp://ftp.caldera.com/pub/updates/OpenServer/CSSA-2002-SCO.39/VOL.* #h #h example of a tar of VOL files #h ./setup_gnu ftp://stage.caldera.com/pub/security/openserver/CSSA-2002-SCO.10/openssh-3.1p1-VOLS.tar #h #h example of a compressed pkgadd file #h /setup_gnu ftp://ftp.caldera.com/pub/openserver5/oss630a.Z #h #h this makes it very painless to just browse the available suppliments at: #h http://www.sco.com/support/ftplists/osr5list.html #h http://www.sco.com/support/security/ #h ftp://ftp2.caldera.com/pub/skunkware/osr5/vols #h and most of them can be installed by just pasting the link from the #h "properties" or "copy-shortcut" options from the right-click menu in a #h web browser into an xterm or telnet session by doing: #h ./setup_gnu [enter] #h #h it also makes it possible to write scripts that can download and install #h sco patches and gnu packages and some commercial software packages #h with little or no user interaction necessary. #h #h it also provides a way give directions for the non-adept to install #h something like a sco patch or update without having to explain the #h whole procedure and all the ins & outs of downloading, unpacking and #h installing a VOL or pkgadd package the normal way. #h #h There is a one-line instruction using "rftp" to install setup_gnu itself #h from Tony Lawrence's ftp site: #h rftp -g -bh ftp.pcunix.com /pub/bkw setup_gnu ;chmod 755 setup_gnu #h once that's done the instructions for installing most packages is one line: #h /setup_gnu url_to_package #h #h 20061110 v2.3 - updated to handle osr6 skunkware path and VOLS.cpio files #h #h TODO #h * use curl if available in place of wget/rftp #h #h Brian K. White - brian@aljex.com - Aljex Software ############################################################################### # # user-definable defaults section # # OSR 5.0.4 - 5.x.x # skunkware vols dir = skunkware/osr5/vols # skunkware vols extension = ...-VOLS.tar # OSR 6.x.x # skunkware vols dir = skunkware/osr6/vols # skunkware vols extension = ...-VOLS.cpio case `uname -v` in 2|5.*) VDIR=osr5 ; VEXT=tar ;; 6.*) VDIR=osr6 ; VEXT=cpio ;; *) printf "Unrecognized system.\nIf this is osr 5.x.x, and less than 5.0.4, then please run uname -v\nand email brian@aljex.com with the result so it can be added to this script." ; exit 1 ;; esac # where do we find the main skunkware ftp repository these days? DEFAULTHOST=ftp2.sco.com DEFAULTPATH=/skunkware/${VDIR}/vols DEFAULTURL=ftp://${DEFAULTHOST}${DEFAULTPATH} PASSIVE_FTP=false # programs that might be installed in /usr/local/bin with the same name as # ones that already exist in /bin or /usr/bin which we would like renamed # to "g" so that you can use the the gnu version of a program by saying # for example, "gdate" instead of having to say "/usr/local/bin/date" # NOTE: these & more already exist now, in /usr/gnu/bin & sbin by installing # gnutools and gwxlibs GLIST="\ tar \ date \ awk \ sed \ " ##### TO DO ##### # # automatically add /usr/local/bin to PATH in /etc/profile # # automatically determine the latest version available of a given package # instead of having to know the exact version numbers # idea: rftp -l ... |sort |awk