Changeset 12 for trunk/src/project_profile.sh
- Timestamp:
- 02/04/14 14:41:26 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/project_profile.sh
r10 r12 13 13 # ======== 14 14 # 15 # Online usage:: 16 # 17 # $ . ./project_profile.sh -d directory -i indir -o outdir -t tempdir -s saxo_dir 18 # 19 # In ${HOME}/.profile, add the following line:: 20 # 21 # . project_profile.sh -d directory -i indir -o outdir -t tempdir -s saxo_dir 15 # Online usage: 16 # 17 # .. code-block:: bash 18 # 19 # . ./project_profile.sh -d directory -i indir -o outdir -t tempdir -s saxo_dir 20 # 21 # In ${HOME}/.profile, add the following line: 22 # 23 # .. code-block:: bash 24 # 25 # . project_profile.sh -d directory -i indir -o outdir -t tempdir -s saxo_dir 22 26 # 23 27 # DESCRIPTION … … 55 59 # ======== 56 60 # 57 # For fplod, on aedon.locean-ipsl.upmc.fr:: 58 # 59 # $ cd /usr/home/fplod/incas/pomme/pomme_ws/ 60 # $ . ./src/project_profile.sh \ 61 # For fplod, on aedon.locean-ipsl.upmc.fr: 62 # 63 # .. code-block:: bash 64 # 65 # cd /usr/home/fplod/incas/pomme/pomme_ws/ 66 # . ./src/project_profile.sh \ 61 67 # -d $(pwd) \ 62 68 # -i /usr/temp/${LOGNAME}/pomme_d/ \ … … 65 71 # -s /usr/home/fplod/SAXO_DIR/ 66 72 # 67 # For fplod on cratos.locean-ipsl.umpc.fr:: 68 # 69 # $ cd ${HOME}/incas/pomme/pomme_ws/ 70 # $ . ./src/project_profile.sh \ 73 # For fplod on cratos.locean-ipsl.umpc.fr: 74 # 75 # .. code-block:: bash 76 # 77 # cd ${HOME}/incas/pomme/pomme_ws/ 78 # . ./src/project_profile.sh \ 71 79 # -d $(pwd) \ 72 80 # -i /usr/temp/${LOGNAME}/pomme_d/ \ … … 75 83 # -s ${HOME}/SAXO_DIR/ 76 84 # 77 # For pinsard on camelot.ipsl.polytechnique.fr or merlin15-c.climserv:: 78 # 79 # $ cd ${HOME}/pomme/ 80 # $ . ./src/project_profile.sh \ 81 # -d $(pwd) \ 82 # -i /homedata/${LOGNAME}/pomme_d/ \ 83 # -o /homedata/${LOGNAME}/pomme_d/ \ 84 # -t /homedata/${LOGNAME}/log/ \ 85 # -s ${HOME}/SAXO_DIR/ 85 # For pinsard on camelot.ipsl.polytechnique.fr or merlin15-c.climserv: 86 # 87 # .. code-block:: bash 88 # 89 # cd ${HOME}/pomme/ 90 # . ./src/project_profile.sh \ 91 # -d $(pwd) \ 92 # -i /homedata/${LOGNAME}/pomme_d/ \ 93 # -o /homedata/${LOGNAME}/pomme_d/ \ 94 # -t /homedata/${LOGNAME}/log/ \ 95 # -s ${HOME}/SAXO_DIR/ 86 96 # 87 97 # TODO … … 94 104 # ++ besoin de posix 95 105 # 96 # ++ pas de MANPATH defini par défaut sur cratos 106 # ++ pas de MANPATH defini par défaut sur cratos et cerbere 97 107 # 98 108 # EVOLUTIONS … … 101 111 # - fplod 20110426T151058Z cratos.locean-ipsl.upmc.fr (Linux) 102 112 # 103 # * add IDL and 113 # * add IDL and SAXO env. 104 114 # * replace POMME by PROJECT 105 115 # * replace zeus by cratos … … 112 122 system=$(uname) 113 123 case "${system}" in 114 AIX|IRIX64)115 echo " www : no specific posix checking"116 ;;117 *)118 set -o posix119 ;;124 AIX|IRIX64) 125 echo " www : no specific posix checking" 126 ;; 127 *) 128 set -o posix 129 ;; 120 130 esac 121 131 unset system … … 132 142 while [ ${#} -gt 0 ] 133 143 do 134 case ${1} in135 -d)136 # directory for application choosen by user (see svn checkout command used)137 directory=${2}138 shift139 ;;140 -i)141 # directory for inputs choosen by user142 indir=${2}143 shift144 ;;145 -o)146 # directory for outputs choosen by user147 outdir=${2}148 shift149 ;;150 -t)151 # directory for temporary outputs choosen by user152 tempdir=${2}153 shift154 ;;155 -s)156 saxo_dir=${2}157 shift158 ;;159 *)160 # other choice161 echo "eee : unknown option ${1}"162 echo "${usage}"163 # nb : no exit because this file should be launched by login process164 ;;165 esac166 # next flag167 shift144 case ${1} in 145 -d) 146 # directory for application choosen by user (see svn checkout command used) 147 directory=${2} 148 shift 149 ;; 150 -i) 151 # directory for inputs choosen by user 152 indir=${2} 153 shift 154 ;; 155 -o) 156 # directory for outputs choosen by user 157 outdir=${2} 158 shift 159 ;; 160 -t) 161 # directory for temporary outputs choosen by user 162 tempdir=${2} 163 shift 164 ;; 165 -s) 166 saxo_dir=${2} 167 shift 168 ;; 169 *) 170 # other choice 171 echo "eee : unknown option ${1}" 172 echo "${usage}" 173 # nb : no exit because this file should be launched by login process 174 ;; 175 esac 176 # next flag 177 shift 168 178 done 169 179 unset usage … … 172 182 if [ ! -d ${directory} ] 173 183 then 174 echo " eee : ${directory} not found"175 # nb : no exit because this file should be launched by login process184 echo " eee : ${directory} not found" 185 # nb : no exit because this file should be launched by login process 176 186 fi 177 187 # … … 179 189 if [ ! -x ${directory} ] 180 190 then 181 echo " eee : ${directory} not reachable"182 # nb : no exit because this file should be launched by login process191 echo " eee : ${directory} not reachable" 192 # nb : no exit because this file should be launched by login process 183 193 fi 184 194 # … … 194 204 if [ ${test_path} -ne 0 ] 195 205 then 196 PATH=${suppath}:${PATH}197 export PATH206 PATH=${suppath}:${PATH} 207 export PATH 198 208 else 199 # option bavarde oui/non pas encore implantée ++200 echo "${command} : iii : ${suppath} already in \${PATH}"209 # option bavarde oui/non pas encore implantée ++ 210 echo "${command} : iii : ${suppath} already in \${PATH}" 201 211 fi 202 212 unset test_path … … 209 219 if [ ${test_manpath} -ne 0 ] 210 220 then 211 MANPATH=${suppath}:${MANPATH}212 export MANPATH221 MANPATH=${suppath}:${MANPATH} 222 export MANPATH 213 223 else 214 # option bavarde oui/non pas encore implantée ++215 echo "${command} : iii : ${suppath} already in \${MANPATH}"224 # option bavarde oui/non pas encore implantée ++ 225 echo "${command} : iii : ${suppath} already in \${MANPATH}" 216 226 fi 217 227 unset test_manpath … … 223 233 if [ ! -d ${PROJECT_LOG} ] 224 234 then 225 mkdir -p ${PROJECT_LOG}226 status=${?}227 if [ ${status} -ne 0 ]228 then229 echo "${command} : eee : can not create \${POMME_LOG}"230 # nb : no exit because this file should be launched by login process231 else232 echo "${command} : iii : creation of \${PROJECT_LOG}"233 fi234 unset status235 mkdir -p ${PROJECT_LOG} 236 status=${?} 237 if [ ${status} -ne 0 ] 238 then 239 echo "${command} : eee : can not create \${POMME_LOG}" 240 # nb : no exit because this file should be launched by login process 241 else 242 echo "${command} : iii : creation of \${PROJECT_LOG}" 243 fi 244 unset status 235 245 fi 236 246 # check for permission on PROJECT_LOG 237 247 if [ ! -x ${PROJECT_LOG} ] 238 248 then 239 echo " eee : ${PROJECT_LOG} not reachable"240 # nb : no exit because this file should be launched by login process249 echo " eee : ${PROJECT_LOG} not reachable" 250 # nb : no exit because this file should be launched by login process 241 251 fi 242 252 # … … 244 254 if [ ! -w ${PROJECT_LOG} ] 245 255 then 246 echo " eee : ${PROJECT_LOG} not writable"247 # nb : no exit because this file shouldreachable be launched by login process256 echo " eee : ${PROJECT_LOG} not writable" 257 # nb : no exit because this file shouldreachable be launched by login process 248 258 fi 249 259 # … … 257 267 if [ ! -d ${PROJECT_ID} ] 258 268 then 259 mkdir -p ${PROJECT_ID}260 echo "${command} : iii : creation of \${PROJECT_ID}"269 mkdir -p ${PROJECT_ID} 270 echo "${command} : iii : creation of \${PROJECT_ID}" 261 271 fi 262 272 # check for permission on PROJECT_ID 263 273 if [ ! -x ${PROJECT_ID} ] 264 274 then 265 echo " eee : ${PROJECT_ID} not reachable"266 # nb : no exit because this file should be launched by login process275 echo " eee : ${PROJECT_ID} not reachable" 276 # nb : no exit because this file should be launched by login process 267 277 fi 268 278 # … … 278 288 if [ ! -x ${PROJECT_OD} ] 279 289 then 280 echo " eee : ${PROJECT_OD} not reachable"281 # nb : no exit because this file should be launched by login process290 echo " eee : ${PROJECT_OD} not reachable" 291 # nb : no exit because this file should be launched by login process 282 292 fi 283 293 if [ ! -w ${PROJECT_OD} ] 284 294 then 285 echo " eee : ${PROJECT_OD} not writable"286 # nb : no exit because this file should be launched by login process295 echo " eee : ${PROJECT_OD} not writable" 296 # nb : no exit because this file should be launched by login process 287 297 fi 288 298 #
Note: See TracChangeset
for help on using the changeset viewer.