--- fix.sh 2001/08/08 12:58:08 1.1 +++ fix.sh 2001/09/29 15:24:48 1.11 @@ -1,6 +1,59 @@ #! /bin/sh +DIRS="img/news img/bolesti img/autori pdf/medicus pdf/inf_glasnik templates_c med/templates_c" +LINKS=". edit +. med/edit +../index.html img/bolesti/index.html +../index.html img/autori/index.html +../index.html img/news/index.html +../img/index.html pdf/index.html +../index.html pdf/medicus/index.html +../index.html pdf/inf_glasnik/index.html +stanja.tpl templates/lifestyle.tpl +../pdf med/pdf +../inc med/inc +../js med/js +../../img/news med/img/news +../../img/banner-title.gif med/img/banner-title.gif +../../img/pisite.gif med/img/pisite.gif +../../img/knjiznica01.gif med/img/hzzo.gif +../../img/R-black.gif med/img/R-black.gif +../../img/R-lgray.gif med/img/R-lgray.gif +../../img/R-dgray.gif med/img/R-dgray.gif +../../img/R-white.gif med/img/R-white.gif +../../img/mali.vademecum.gif med/img/mali.vademecum.gif +../../img/pio.gif med/img/pio.gif +../../img/chat.gif med/img/chat.gif +../../img/procitajclanak.gif med/img/procitajclanak.gif +../../img/procitaj01.gif med/img/procitaj01.gif +../../img/procitaj02.gif med/img/procitaj02.gif +../../img/procitaj03.gif med/img/procitaj03.gif +../../img/bolesti med/img/bolesti +../../img/autori med/img/autori +../../img/banneri med/img/banneri +../../img/vademecum med/img/vademecum +../../templates/edit.tpl med/templates/edit.tpl +../../templates/show.tpl med/templates/show.tpl +../../templates/search.tpl med/templates/search.tpl +../../templates/links.tpl med/templates/links.tpl +../../templates/wrapper.tpl med/templates/wrapper.tpl +../../templates/print.tpl med/templates/print.tpl +../../templates/footer.tpl med/templates/footer.tpl +../../templates/author.tpl med/templates/author.tpl +../../templates/highlight.tpl med/templates/highlight.tpl +../../templates/mnogosearch.tpl med/templates/mnogosearch.tpl +../../templates/qa.tpl med/templates/qa.tpl +../../templates/knjiznica-vademecum.tpl med/templates/vademecum.tpl +../../templates/knjiznica-lijekovi.tpl med/templates/lijekovi.tpl +../index.php med/index.php +../pdf.php med/pdf.php +../legal.php med/legal.php +../stil.php med/stil.php +../levels.css med/levels.css +../button.php med/button.php" +# ------------- +cd "`dirname "${0}"`" echo -n "Creating dirs:" -for i in img/news img/bolesti templates_c +for i in ${DIRS} do [ -e "${i}" ] && continue echo -n " [${i}]" @@ -9,20 +62,14 @@ done echo " done." echo -n "Creating symlinks:" -if [ ! -e "templates/d_s.tpl" ] -then - echo -n " [templates/d_s.tpl]" - ln -s temp.tpl templates/d_s.tpl -fi -if [ ! -e "templates/lifestyle.tpl" ] -then - echo -n " [templates/lifestyle.tpl]" - ln -s conditions.tpl templates/lifestyle.tpl -fi -if [ ! -e "inc/pgLifestyle.php" ] -then - echo -n " [inc/pgLifestyle.php]" - ln -s pgConditions.php inc/pgLifestyle.php -fi +echo "${LINKS}" | while read line +do + set -- ${line} + [ -z "${1}" ] && continue + [ -z "${2}" ] && continue + [ -e "${2}" ] && continue + echo -n " [${2}]" + ln -s "${1}" "${2}" +done echo " done." exit "${?}"