Changeset 175
- Timestamp:
- 04/06/12 13:22:38 (12 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/project_profile.sh
- Property svn:keywords set to Id URL
r157 r175 2 2 #+ 3 3 # 4 # .. program:: superbib_profile.sh4 # .. program:: project_profile.sh 5 5 # 6 6 # =================== 7 # superbib_profile.sh7 # project_profile.sh 8 8 # =================== 9 9 # 10 # ---------------------------11 # define SUPERBIB environment12 # ---------------------------13 10 # 14 11 # SYNOPSIS … … 17 14 # Online usage :: 18 15 # 19 # $ . ./ superbib_profile.sh -d directory -i indir -o outdir -t tempdir16 # $ . ./project_profile.sh -d directory -i indir -o outdir -t tempdir 20 17 # 21 18 # In :file:`${HOME}/.profile`, add the following line :: 22 19 # 23 # . superbib_profile.sh -d directory -i indir -o outdir -t tempdir20 # . project_profile.sh -d directory -i indir -o outdir -t tempdir 24 21 # 25 22 # DESCRIPTION … … 33 30 # define SUPERBIB environment 34 31 # 35 # ${ SUPERBIB} is the base directory of tools.36 # 37 # ${ SUPERBIB_LOG} is the directory where log files will be written.38 # 39 # ${ SUPERBIB_ID} is the directory where input files must be.40 # 41 # ${ SUPERBIB_OD} is the directory where output files will be written.32 # ${PROJECT} is the base directory of tools. 33 # 34 # ${PROJECT_LOG} is the directory where log files will be written. 35 # 36 # ${PROJECT_ID} is the directory where input files must be. 37 # 38 # ${PROJECT_OD} is the directory where output files will be written. 42 39 # 43 40 # MANPATH++ … … 49 46 # 50 47 # $ cd /usr/home/fplod/src/superbib/superbib_ws/ 51 # $ . ./src/ superbib_profile.sh \48 # $ . ./src/project_profile.sh \ 52 49 # -d $(pwd) \ 53 50 # -i /usr/temp/${LOGNAME}/superbib_d/ \ … … 70 67 # 71 68 # $Id$ 69 # 70 # $URL$ 71 # 72 # - fplod 20120405T085555Z cratos (Linux) 73 # 74 # * rename and replace SUPERBIB by PROJECT 72 75 # 73 76 # - fplod 20100426T094821Z aedon.locean-ipsl.upmc.fr (Darwin) … … 98 101 # 99 102 # as this script might be launch in .profile, command is forced. 100 command= superbib_profile.sh103 command=project_profile.sh 101 104 # 102 105 usage=" Usage : ${command} -d directory -i indir -o outdir -t tempdir" … … 151 154 fi 152 155 # 153 SUPERBIB=${directory}154 export SUPERBIB155 # 156 # add SUPERBIBtools to PATH156 PROJECT=${directory} 157 export PROJECT 158 # 159 # add PROJECT tools to PATH 157 160 # if not already done 158 suppath=$(echo ${ SUPERBIB} | tr -s "/")161 suppath=$(echo ${PROJECT} | tr -s "/") 159 162 echo ${PATH} | grep -q "${suppath}:" 160 163 test_path=${?} … … 170 173 unset suppath 171 174 # 172 # add SUPERBIBmanuals to MANPATH175 # add PROJECT manuals to MANPATH 173 176 # if not already done 174 suppath=$(echo ${ SUPERBIB}/doc/manuals/man | tr -s "/")177 suppath=$(echo ${PROJECT}/doc/manuals/man | tr -s "/") 175 178 echo ${MANPATH} | grep -q "${suppath}:" 176 179 test_manpath=${?} … … 186 189 unset suppath 187 190 # 188 SUPERBIB_LOG=${tempdir}189 export SUPERBIB_LOG191 PROJECT_LOG=${tempdir} 192 export PROJECT_LOG 190 193 unset tempdir 191 if [ ! -d ${ SUPERBIB_LOG} ]192 then 193 mkdir -p ${ SUPERBIB_LOG}194 if [ ! -d ${PROJECT_LOG} ] 195 then 196 mkdir -p ${PROJECT_LOG} 194 197 status=${?} 195 198 if [ ${status} -ne 0 ] 196 199 then 197 echo "${command} : eee : can not create \${ SUPERBIB_LOG}"200 echo "${command} : eee : can not create \${PROJECT_LOG}" 198 201 # nb : no exit because this file should be launched by login process 199 202 else 200 echo "${command} : iii : creation of \${ SUPERBIB_LOG}"203 echo "${command} : iii : creation of \${PROJECT_LOG}" 201 204 fi 202 205 unset status 203 206 fi 204 # check for permission on SUPERBIB_LOG205 if [ ! -x ${ SUPERBIB_LOG} ]206 then 207 echo " eee : ${ SUPERBIB_LOG} not reachable"208 # nb : no exit because this file should be launched by login process 209 fi 210 # 211 # check for permission on SUPERBIB_LOG212 if [ ! -w ${ SUPERBIB_LOG} ]213 then 214 echo " eee : ${ SUPERBIB_LOG} not writable"207 # check for permission on PROJECT_LOG 208 if [ ! -x ${PROJECT_LOG} ] 209 then 210 echo " eee : ${PROJECT_LOG} not reachable" 211 # nb : no exit because this file should be launched by login process 212 fi 213 # 214 # check for permission on PROJECT_LOG 215 if [ ! -w ${PROJECT_LOG} ] 216 then 217 echo " eee : ${PROJECT_LOG} not writable" 215 218 # nb : no exit because this file shouldreachable be launched by login process 216 219 fi … … 220 223 # 221 224 # io directories 222 SUPERBIB_ID=${indir}223 export SUPERBIB_ID225 PROJECT_ID=${indir} 226 export PROJECT_ID 224 227 unset indir 225 if [ ! -d ${ SUPERBIB_ID} ]226 then 227 mkdir -p ${ SUPERBIB_ID}228 echo "${command} : iii : creation of \${ SUPERBIB_ID}"229 fi 230 # check for permission on SUPERBIB_ID231 if [ ! -x ${ SUPERBIB_ID} ]232 then 233 echo " eee : ${ SUPERBIB_ID} not reachable"234 # nb : no exit because this file should be launched by login process 235 fi 236 # 237 SUPERBIB_OD=${outdir}238 export SUPERBIB_OD228 if [ ! -d ${PROJECT_ID} ] 229 then 230 mkdir -p ${PROJECT_ID} 231 echo "${command} : iii : creation of \${PROJECT_ID}" 232 fi 233 # check for permission on PROJECT_ID 234 if [ ! -x ${PROJECT_ID} ] 235 then 236 echo " eee : ${PROJECT_ID} not reachable" 237 # nb : no exit because this file should be launched by login process 238 fi 239 # 240 PROJECT_OD=${outdir} 241 export PROJECT_OD 239 242 unset outdir 240 if [ ! -d ${ SUPERBIB_OD} ]241 then 242 mkdir -p ${ SUPERBIB_OD}243 echo "${command} : iii : creation of \${ SUPERBIB_OD}"244 fi 245 # check for permission on SUPERBIB_OD246 if [ ! -x ${ SUPERBIB_OD} ]247 then 248 echo " eee : ${ SUPERBIB_OD} not reachable"249 # nb : no exit because this file should be launched by login process 250 fi 251 if [ ! -w ${ SUPERBIB_OD} ]252 then 253 echo " eee : ${ SUPERBIB_OD} not writable"243 if [ ! -d ${PROJECT_OD} ] 244 then 245 mkdir -p ${PROJECT_OD} 246 echo "${command} : iii : creation of \${PROJECT_OD}" 247 fi 248 # check for permission on PROJECT_OD 249 if [ ! -x ${PROJECT_OD} ] 250 then 251 echo " eee : ${PROJECT_OD} not reachable" 252 # nb : no exit because this file should be launched by login process 253 fi 254 if [ ! -w ${PROJECT_OD} ] 255 then 256 echo " eee : ${PROJECT_OD} not writable" 254 257 # nb : no exit because this file should be launched by login process 255 258 fi
Note: See TracChangeset
for help on using the changeset viewer.