Changeset 100 for trunk/superbib_profile.sh
- Timestamp:
- 04/14/10 16:38:53 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/superbib_profile.sh
r95 r100 13 13 # ======== 14 14 # 15 # Online usage 16 # 17 # :: 18 # 19 # $ . ./superbib_profile.sh -d directory -i indir -o outdir -t tempdir 20 # 21 # In ${HOME}/.profile, add the following line 22 # 23 # :: 24 # 25 # . superbib_profile.sh -d directory -i indir -o outdir -t tempdir 15 # Online usage :: 16 # 17 # $ . ./superbib_profile.sh -d directory -i indir -o outdir -t tempdir 18 # 19 # In ${HOME}/.profile, add the following line :: 20 # 21 # . superbib_profile.sh -d directory -i indir -o outdir -t tempdir 26 22 # 27 23 # DESCRIPTION … … 43 39 # ======== 44 40 # 45 # For fplod, on aedon.locean-ipsl.upmc.fr: 46 # 47 # :: 48 # 49 # $ cd /usr/home/fplod/src/superbib/superbib_ws/src/ 50 # $ . ./superbib_profile.sh \ 41 # For fplod, on aedon.locean-ipsl.upmc.fr:: 42 # 43 # $ cd /usr/home/fplod/src/superbib/superbib_ws/ 44 # $ . ./src/superbib_profile.sh \ 51 45 # -d $(pwd) \ 52 46 # -i /usr/temp/${LOGNAME}/superbib_d/ \ … … 59 53 # ++ option bavarde 60 54 # 61 # ++ machine dependant 62 # 55 # ++ machine dependant 56 # 63 57 # ++ compilateur dependant 64 58 # 65 # ++ pas de MANPATH defini par d éfaut sur zeus59 # ++ pas de MANPATH defini par defaut sur zeus 66 60 # 67 61 # EVOLUTIONS … … 77 71 system=$(uname) 78 72 case "${system}" in 79 AIX|IRIX64)80 echo " www : no specific posix checking"81 ;;82 *)83 set -o posix84 ;;73 AIX|IRIX64) 74 echo " www : no specific posix checking" 75 ;; 76 *) 77 set -o posix 78 ;; 85 79 esac 80 unset system 86 81 # 87 82 # as this script might be launch in .profile, command is forced. … … 92 87 while [ ! -z "${1}" ] # ++ pb bash 93 88 do 94 case ${1} in 95 -d) # directory for application choosen by user (see svn checkout command used) 96 directory=${2} 97 shift 98 ;; 99 -i) # directory for inputs choosen by user 100 indir=${2} 101 shift 102 ;; 103 -o) # directory for outputs choosen by user 104 outdir=${2} 105 shift 106 ;; 107 -t) # directory for temporary outputs choosen by user 108 tempdir=${2} 109 shift 110 ;; 111 *) # other choice 112 echo "${usage}" 113 # nb : no exit because this file should be launched by login process 114 ;; 115 esac 116 shift # next flag 89 case ${1} in 90 -d) # directory for application choosen by user (see svn checkout command used) 91 directory=${2} 92 shift 93 ;; 94 -i) # directory for inputs choosen by user 95 indir=${2} 96 shift 97 ;; 98 -o) # directory for outputs choosen by user 99 outdir=${2} 100 shift 101 ;; 102 -t) # directory for temporary outputs choosen by user 103 tempdir=${2} 104 shift 105 ;; 106 *) # other choice 107 echo "eee : unknown option ${1}" 108 echo "${usage}" 109 # nb : no exit because this file should be launched by login process 110 ;; 111 esac 112 shift # next flag 117 113 done 114 unset usage 118 115 # 119 116 # check for ${directory} 120 117 if [ ! -d ${directory} ] 121 118 then 122 echo " eee : ${directory} not found"123 # nb : no exit because this file should be launched by login process119 echo " eee : ${directory} not found" 120 # nb : no exit because this file should be launched by login process 124 121 fi 125 122 # … … 127 124 if [ ! -x ${directory} ] 128 125 then 129 echo " eee : ${directory} not reachable" 130 # nb : no exit because this file should be launched by login process 131 fi 132 # 133 system=$(uname) 126 echo " eee : ${directory} not reachable" 127 # nb : no exit because this file should be launched by login process 128 fi 134 129 # 135 130 SUPERBIB=${directory} … … 148 143 echo "${command} : iii : ${SUPERBIB}/ already in \${PATH}" 149 144 fi 145 unset test_path 150 146 # 151 147 # add SUPERBIB manuals to MANPATH … … 155 151 if [ ${test_manpath} -ne 0 ] 156 152 then 157 MANPATH=${SUPERBIB}/ man/:${MANPATH}153 MANPATH=${SUPERBIB}/doc/manuals/man/:${MANPATH} 158 154 export MANPATH 159 155 else 160 156 # option bavarde oui/non pas encore implantée ++ 161 echo "${command} : iii : ${SUPERBIB}/man/ already in \${MANPATH}" 162 fi 157 echo "${command} : iii : ${SUPERBIB}/doc/manuals/man/ already in \${MANPATH}" 158 fi 159 unset test_manpath 163 160 # 164 161 SUPERBIB_LOG=${tempdir} 165 162 export SUPERBIB_LOG 166 if [ ! -d ${SUPERBIB_LOG} ] 167 then 168 mkdir -p ${SUPERBIB_LOG} 169 echo "${command} : iii : creation of \${SUPERBIB_LOG}" 170 fi 163 unset tempdir 164 if [ ! -d ${SUPERBIB_LOG} ] 165 then 166 mkdir -p ${SUPERBIB_LOG} 167 echo "${command} : iii : creation of \${SUPERBIB_LOG}" 168 fi 171 169 # check for permission on SUPERBIB_LOG 172 170 if [ ! -x ${SUPERBIB_LOG} ] 173 171 then 174 echo " eee : ${SUPERBIB_LOG} not reachable"175 # nb : no exit because this file should be launched by login process172 echo " eee : ${SUPERBIB_LOG} not reachable" 173 # nb : no exit because this file should be launched by login process 176 174 fi 177 175 # … … 179 177 if [ ! -w ${SUPERBIB_LOG} ] 180 178 then 181 echo " eee : ${SUPERBIB_LOG} not writable"182 # nb : no exit because this file shouldreachable be launched by login process179 echo " eee : ${SUPERBIB_LOG} not writable" 180 # nb : no exit because this file shouldreachable be launched by login process 183 181 fi 184 182 # … … 189 187 SUPERBIB_ID=${indir} 190 188 export SUPERBIB_ID 191 if [ ! -d ${SUPERBIB_ID} ] 192 then 193 mkdir -p ${SUPERBIB_ID} 194 echo "${command} : iii : creation of \${SUPERBIB_ID}" 195 fi 189 unset indir 190 if [ ! -d ${SUPERBIB_ID} ] 191 then 192 mkdir -p ${SUPERBIB_ID} 193 echo "${command} : iii : creation of \${SUPERBIB_ID}" 194 fi 196 195 # check for permission on SUPERBIB_ID 197 196 if [ ! -x ${SUPERBIB_ID} ] 198 197 then 199 echo " eee : ${SUPERBIB_ID} not reachable"200 # nb : no exit because this file should be launched by login process198 echo " eee : ${SUPERBIB_ID} not reachable" 199 # nb : no exit because this file should be launched by login process 201 200 fi 202 201 # 203 202 SUPERBIB_OD=${outdir} 204 203 export SUPERBIB_OD 204 unset outdir 205 205 if [ ! -d ${SUPERBIB_OD} ] 206 206 then 207 mkdir -p ${SUPERBIB_OD}208 echo "${command} : iii : creation of \${SUPERBIB_OD}"207 mkdir -p ${SUPERBIB_OD} 208 echo "${command} : iii : creation of \${SUPERBIB_OD}" 209 209 fi 210 210 # check for permission on SUPERBIB_OD 211 211 if [ ! -x ${SUPERBIB_OD} ] 212 212 then 213 echo " eee : ${SUPERBIB_OD} not reachable"214 # nb : no exit because this file should be launched by login process213 echo " eee : ${SUPERBIB_OD} not reachable" 214 # nb : no exit because this file should be launched by login process 215 215 fi 216 216 if [ ! -w ${SUPERBIB_OD} ] 217 217 then 218 echo " eee : ${SUPERBIB_OD} not writable"219 # nb : no exit because this file should be launched by login process218 echo " eee : ${SUPERBIB_OD} not writable" 219 # nb : no exit because this file should be launched by login process 220 220 fi 221 221 # 222 222 # end 223 unset command 223 224 # nb : no exit because this file should be launched by login process
Note: See TracChangeset
for help on using the changeset viewer.