Changes between Version 3 and Version 4 of Shell
- Timestamp:
- 10/19/06 18:36:25 (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Shell
v3 v4 8 8 {{{ 9 9 #!sh 10 #!/bin/sh11 12 10 function die () 13 11 { … … 15 13 local msg=$2 16 14 17 echo "${msg} : ${stat}" 1>&215 echo "${msg} (S:${stat})" 1>&2 18 16 exit ${stat} 19 17 } … … 29 27 fi 30 28 done 31 32 die 15 "ERR: no such target: ${tgt}"33 29 } 34 30 … … 36 32 { 37 33 if [ -z "$CHAIN" ]; then 38 die 3 3"\`\$CHAIN' not declared"34 die 30 "\`\$CHAIN' not declared" 39 35 fi 40 36 … … 42 38 local arg=$2 43 39 local dnum=`_depnum ${tgt}` 40 41 if [ -z "${dnum}" ]; then 42 die 36 "ERR: no such target: ${tgt}" 43 fi 44 44 45 45 for ((i=0; i <= ${dnum}; i++)); do … … 92 92 {{{ 93 93 #!sh 94 $ sh dop.sh upload 94 $ sh ./dop.sh clean 95 arg_clean: init 96 97 result: cleaned 98 99 $ sh ./dop.sh pack 100 arg_clean: init 101 arg_pack: cleaned 102 103 result: packed 104 105 $ sh ./dop.sh upload 95 106 arg_clean: init 96 107 arg_pack: cleaned … … 98 109 99 110 result: uploaded 100 101 $ sh dop.sh pack102 arg_clean: init103 arg_pack: cleaned104 105 result: packed106 107 $ sh dop.sh clean108 arg_clean: init109 110 result: cleaned111 111 }}} 112 112