Changeset 2313
- Timestamp:
- 06/16/07 08:33:27 (1 year ago)
- Files:
-
- trunk/install/dmd-posix/installer.sh (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/install/dmd-posix/installer.sh
r2230 r2313 15 15 } 16 16 17 usage() { 18 echo 'Usage: <installer-name>.sh [--prefix <install prefix>] 19 Options: 20 --prefix: Install prefix is optional on the command line, if not set it 21 will be requested during install. The set prefix needs to be 22 an absolute path.' 23 exit 0 24 } 25 26 17 27 # Figure out our complete name 18 28 ORIGDIR=`pwd` … … 20 30 FULLNAME="`pwd`/`basename $0`" 21 31 cd $ORIGDIR 32 33 # parse arguments 34 while [ "$#" != "0" ] 35 do 36 if [ "$1" = "--prefix" ] 37 then 38 shift 39 40 PREFIX="$1" 41 else 42 usage 43 fi 44 shift 45 done 22 46 23 47 # Create our temporary directory … … 33 57 if [ "$INST_DMD" = "1" ] 34 58 then 35 if [ ! "$ 1" ]59 if [ ! "$PREFIX" ] 36 60 then 37 echo -n "What prefix do you want to install DMD to ? "61 echo -n "What prefix do you want to install DMD to (absolute path)? " 38 62 read DMDDIR 39 63 else 40 DMDDIR="$ 1"64 DMDDIR="$PREFIX" 41 65 fi 66 67 if [ "${DMDDIR:0:1}" != "/" ] 68 then 69 die 1 "The PREFIX needs to be an absolute path" 70 fi 42 71 43 72 export PATH="$DMDDIR/bin:$PATH" … … 76 105 fi 77 106 107 if [ "${DMDDIR:0:1}" != "/" ] 108 then 109 die 1 "The PREFIX needs to be an absolute path" 110 fi 111 112 78 113 # Then, cd to our tmpdir and extract core.tar.gz 79 114 cd $TTMP || die 1 "Failed to cd to temporary directory"












