#!/bin/sh # # deploy.sh # # (beware the DOS CR-LF - gotcha) # # ./deploy.sh dev-root(src) app-root(dst) # e.g. ./deploy.sh /home/bluhrs/html/capstone/project /home/bluhrs/html/iwander # # # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Copyright (C) July 2001, Bruce Luhrs -MSIE Graduate Center, Marlboro College # The contents of this file are not to be used # without the permission of Bruce Luhrs. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # B. Luhrs # 17-Jul-2001 fix missing w*.jpg copy # 15-Jul-2001 update for additional help info & 2html code-html files # 12-Jul-2001 update for conf-files,bl++ # add setup ln -s index.html if not already one in 'app-root' # 11-Jul-2001 initial version # ################################################### # # cmd line args should be 'dev-root'(src) and 'app-root'(dest) if [ $# -lt 2 ]; then echo 'Usage: $0 dev-root(src) app-root(dst)'; exit 1; fi # report the directories to be used echo Src: $1 echo Dst: $2 sleep 5 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # assume development directory structure exists as 'documented'! # ... the 'dev-root' DEVELOPMENT AREA (e.g. /home/bluhrs/html/capstone/project) # is assumed to have the latest versions files as such: # # /home/bluhrs/html/capstone/project (dev-root) # |________________________________________ # | | | | | | # data doc logs scripts src test # | # |_______________________________ # | | | | # help regions views waypts # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # ... the 'app-root' application AREA (e.g. /home/bluhrs/html/iwander) # is assumed to have the latest versions files as such: # # /home/bluhrs/html/iwander (app-root) # | # |------------------, # scripts iwander.html (iWander 'home page') index.html (if none) # | (.jpgs,.gifs) # |__________________________________________________ # | | | | | # iwander.cgi help waypts views regions # adminmenu.cgi | | | | # starttrip.cgi mainhelp.html (.... .html, .jpgs .....) # waypoint.cgi adminhelp.html # showlog.cgi (.htmls, .jpgs..) # iwander.conf # (.jpgs,.gifs) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # create the destination (application area) directories # mkdir -p gives no error if already exists mkdir -p $2 echo created... $2 mkdir -p $2/scripts echo created... $2/scripts mkdir -p $2/scripts/help echo created... $2/scripts/help mkdir -p $2/scripts/waypts echo created... $2/scripts/waypts mkdir -p $2/scripts/views echo created... $2/scripts/views mkdir -p $2/scripts/regions echo created... $2/scripts/regions sleep 5 # time to see what's happened # (TBS) walk the dev/src-area tree & do the CVS CHECKOUTS ?? # (TBD) # COPIES are done 'interactively' to be SAFE # top-level destination area - 'index.html' and supporting images cd $2 echo $2 ...contains: cp -i $1/src/iwander.html . # homepage # ............... $2/index.html could be placed - check for conflict; ln -si $2/iwander.html $2/index.html cp -i $1/src/yellowpaper.gif . # 'background'(iwander.html) cp -i $1/src/iwanderlogo.jpg . # 'logo' cp -i $1/src/compass.gif . # start icon ls -a $2 sleep 5 # time to see what's happened # next destination area - Perl CGI scripts cd $2/scripts echo $2/scripts ...contains: cp -i $1/src/iwander.conf . # config files cp -i $1/src/remoff.conf . cp -i $1/src/locoff.conf . cp -i $1/src/remon.conf . cp -i $1/src/locon.conf . cp -i $1/src/iwander.cgi . # welcome-page cp -i $1/src/starttrip.cgi . # start-trip page cp -i $1/src/waypoint.cgi . # current-waypoint page cp -i $1/src/showlog.cgi . # show-log page cp -i $1/src/adminmenu.cgi . # admin-ops page chmod +x *.cgi ls -a $2/scripts sleep 5 # .. also their supporting images echo $2/scripts ... also contains: cp -i $1/src/lifebuoy_help.gif . # user-help icon cp -i $1/src/admin.gif . # admin-ops icon cp -i $1/src/info.gif . # admin-info icon cp -i $1/src/iwanderlogosm.jpg . # 'logo' cp -i $1/src/log.gif . # show-log icon cp -i $1/src/yellowpaper.gif . # 'background'(iwander, starttrip.cgi) cp -i $1/src/bluepaper.gif . # 'background' (admin) ls -a $2/scripts sleep 5 # next destination area - Data - Help & information files cd $2/scripts/help echo $2/scripts/help ...contains: cp -i $1/data/help/adminhelp.html . # admin help info cp -i $1/data/help/mainhelp.html . # user help info cp -i $1/src/info.gif . # admin-info icon (for web-map) cp -i $1/data/help/highlights.html . cp -i $1/data/help/datadict.html . cp -i $1/data/help/datatables.html . cp -i $1/data/help/directories.html . cp -i $1/data/help/release.html . cp -i $1/data/help/shorttrip.html . cp -i $1/data/help/tech-diagram.gif . cp -i $1/data/help/technologies.html . cp -i $1/data/help/webmap.gif . cp -i $1/data/help/webmap.html . cp -i $1/scripts/deploy.txt . cp -i $1/data/help/iwanderhtml.html . # code-2-html file cp -i $1/data/help/iwandercgi.html . cp -i $1/data/help/starttripcgi.html . cp -i $1/data/help/waypointcgi.html . cp -i $1/data/help/showlogcgi.html . cp -i $1/data/help/adminmenucgi.html . cp -i $1/src/yellowpaper.gif . # 'background' cp -i $1/src/bluepaper.gif . # 'background' cp -i $1/src/iwanderlogo.jpg . # 'logo' ls -a $2/scripts/help sleep 5 # next destination area - Data - REGIONS cd $2/scripts/regions echo $2/scripts/regions ...contains: # ... Test Data cp -i $1/test/region1.jpg . cp -i $1/test/r1info.html . cp -i $1/test/regtest1.jpg . # ...tbs - MF Data cp -i $1/data/regions/rMFsign.jpg . cp -i $1/data/regions/rMFinfo.html . cp -i $1/data/regions/rMFchart.jpg . ls -a $2/scripts/regions sleep 5 # next destination area - Data - WAYPTS cd $2/scripts/waypts echo $2/scripts/waypts ...contains: # ... Test Data cp -i $1/test/r1s*info.html . cp -i $1/test/w*info.html . cp -i $1/test/waypoint*.jpg . # ... MF Data - 4 starting points, 13 waypoints (101-113), 81 views cp -i $1/data/waypts/rMFs*.html . cp -i $1/data/waypts/wMF*info.html . cp -i $1/data/waypts/wMF*.jpg . ls -a $2/scripts/waypts sleep 5 # next destination area - Data - VIEWS cd $2/scripts/views echo $2/scripts/views ...contains: # ... Test Data cp -i $1/test/v*info.html . cp -i $1/test/view*.jpg . # ... MF Data cp -i $1/data/views/vMF*info.html . cp -i $1/data/views/vMF*.jpg . ls -a $2/scripts/views sleep 5 exit