Changeset 23 for trunk/install.sh
- Timestamp:
- 09/28/07 12:27:10 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/install.sh
- Property svn:keywords set to Id
r14 r23 2 2 # 3 3 # module : 4 # installation des pages bibnemomaf dans DIRFINAL* donné en argument 5 # à partir des fichiers produits ou copiés ou liés sous DIRWWW 6 # donné en argument 4 # publication (rsync) of dirwww content on dirpublish given in argument 7 5 # 8 # nb : !!! attention utilisation du compte fplod@aedon.lodyc.jussieu.fr 9 # 10 # source : 11 # /usr/home/fplod/incas/bibnemo/src/bibnemomaf/install.sh sur aedon.locean-ipsl.upmc.fr 6 # If the host of publication is cerbere.locean-ipsl.upmc.fr, update_web is 7 # launched. 12 8 # 13 9 # update 10 # $Id$ 11 # fplod 2007-09-28T09:30:43Z aedon.locean-ipsl.upmc.fr (Darwin) 12 # parametrisation and translation 14 13 # smasson 2007-06-07T16:43:42Z arete.locean-ipsl.upmc.fr (Darwin) 15 14 # can give the answer with input parameters 16 15 # fplod 2007-04-26T11:51:42Z aedon.locean-ipsl.upmc.fr (Darwin) 17 16 # 18 # ++ simu paramètre 19 DIRFINALLOCEAN=smasson@arete.locean-ipsl.upmc.fr:Sites/bibnemomaf/ 20 DIRWWW=/tmp/bibopa/ 17 set -o posix 18 command=$(basename ${0} .sh) 19 log_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") 20 log=/tmp/${command}.${log_date} 21 # 22 usage=" Usage : ${command} -w dirwww -p dirpublish" 23 # 24 minargcount=4 25 echo " narg ${#}" 26 if [ ${#} -lt ${minargcount} ] 27 then 28 echo "eee : not enought arguments" 29 echo "${usage}" 30 exit 1 31 fi 32 # 33 while [ ! -z "${1}" ] 34 do 35 case ${1} in 36 -w) 37 dirwww=${2} 38 shift 39 ;; 40 -p) 41 dirpublish=${2} 42 shift 43 ;; 44 esac 45 shift # next flag 46 done 47 # 48 set -u 49 # 50 # ++ check directories 21 51 # 22 52 answer=${1:-" "} … … 25 55 ;; 26 56 *) 27 echo "Do you want to install on ${ DIRFINALLOCEAN} (y|[n]) ?"28 read answer 57 echo "Do you want to install on ${dirpublish} (y|[n]) ?" 58 read answer 29 59 ;; 30 60 esac 31 61 case ${answer} in 32 62 y|Y) 33 # copy of ${DIRWWW} on $DIRFINALLOCEAN 34 echo "iii : update of ${DIRFINALLOCEAN}" 35 rsync -av -e ssh ${DIRWWW}/ ${DIRFINALLOCEAN} 36 # pas sur aedon ssh fplod@cerbere.lodyc.jussieu.fr /usr/local_linux/bin/update_web 63 # copy of ${dirwww} on $dirpublish 64 echo "iii : update of ${dirpublish}" 65 rsync -av -e ssh ${dirwww}/ ${dirpublish} 66 # detect if in dirpublish following this pattern [USER@]HOST:SRC, HOST 67 # is cerbere.locean-ipsl.upmc.fr. If so, update_web is launched 68 userhost=${dirpublish%%:*} 69 host=${userhost##*@} 70 if [ "${host}" = "cerbere.locean-ipsl.upmc.fr" ] 71 then 72 ssh ${userhost} /usr/local_linux/bin/update_web 73 fi 37 74 ;; 38 75 *) 39 echo "no update of ${DIRFINALLOCEAN}" 40 ;; 41 esac 42 # 43 # ++ simu paramètre 44 DIRFINALLOCEAN=opatlod@cerbere.locean-ipsl.upmc.fr:NEMO/general/biblio_new/ 45 # 46 answer=${2:-" "} 47 case ${answer} in 48 y|Y|n|N) 49 ;; 50 *) 51 echo "Do you want to install on ${DIRFINALLOCEAN} (y|[n]) ?" 52 read answer 53 ;; 54 esac 55 case ${answer} in 56 y|Y) 57 # copy of ${DIRWWW} on $DIRFINALLOCEAN 58 echo "iii : update of ${DIRFINALLOCEAN}" 59 rsync -av -e ssh ${DIRWWW}/ ${DIRFINALLOCEAN} 60 ssh opatlod@cerbere.lodyc.jussieu.fr /usr/local_linux/bin/update_web 61 ;; 62 *) 63 echo "no update of ${DIRFINALLOCEAN}" 76 echo "no update of ${dirpublish}" 64 77 ;; 65 78 esac
Note: See TracChangeset
for help on using the changeset viewer.