1 #!/bin/ksh93 2 # 3 ########################################################################### 4 # 5 # Copyright 2008 Sun Microsystems, Inc. All rights reserved. 6 # 7 # Permission is hereby granted, free of charge, to any person obtaining a 8 # copy of this software and associated documentation files (the 9 # "Software"), to deal in the Software without restriction, including 10 # without limitation the rights to use, copy, modify, merge, publish, 11 # distribute, and/or sell copies of the Software, and to permit persons 12 # to whom the Software is furnished to do so, provided that the above 13 # copyright notice(s) and this permission notice appear in all copies of 14 # the Software and that both the above copyright notice(s) and this 15 # permission notice appear in supporting documentation. 16 # 17 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 18 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 20 # OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 21 # HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 22 # INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 23 # FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 24 # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 25 # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 26 # 27 # Except as contained in this notice, the name of a copyright holder 28 # shall not be used in advertising or otherwise to promote the sale, use 29 # or other dealings in this Software without prior written authorization 30 # of the copyright holder. 31 # 32 ########################################################################### 33 # 34 # ident "@(#)download-tarballs 1.4 08/08/12 SMI" 35 # 36 37 CLOBBER=0 38 WGET=/usr/sfw/bin/wget 39 MAKE_FLAGS="-k" 40 # Make sure Solaris make, not GNU make, is first in the $PATH 41 export PATH=/usr/bin:/usr/ccs/bin 42 43 set -- `getopt cn $*` 44 if [[ $? != 0 ]] ; then 45 echo USAGE: $0 [-c] [-n] 46 exit 2 47 fi 48 49 for i in $* ; do 50 case $i in 51 -c) CLOBBER=1; shift;; 52 -n) WGET="echo $WGET"; MAKE_FLAGS="$MAKE_FLAGS -n" ; shift;; 53 esac 54 done 55 56 set -v 57 58 cd XW_NV/open-src 59 if [[ $CLOBBER = 1 ]] ; then 60 rm -rf tarballs 61 fi 62 if [[ ! -d tarballs ]] ; then 63 mkdir tarballs 64 fi 65 make $MAKE_FLAGS download 66 cd ../.. 67 68