--- fix.sh 2001/10/10 12:40:58 1.15 +++ fix.sh 2001/10/12 09:22:02 1.16 @@ -1,8 +1,7 @@ #! /bin/sh DIRS="img/news img/bolesti img/autori pdf/medicus pdf/inf_glasnik pdf/farm_glasnik templates_c med/templates_c" -LINKS=". edit -. med/edit -../index.html img/bolesti/index.html +DIRS2="edit med/edit" +LINKS="../index.html img/bolesti/index.html ../index.html img/autori/index.html ../index.html img/news/index.html ../img/index.html pdf/index.html @@ -51,7 +50,8 @@ ../pdf.php med/pdf.php ../legal.php med/legal.php ../stil.php med/stil.php -../levels.css med/levels.css" +../levels.css med/levels.css +../../edit/.htaccess med/edit/.htaccess" # ------------- cd "`dirname "${0}"`" echo -n "Creating dirs:" @@ -62,6 +62,21 @@ mkdir -p "${i}" chmod 777 "${i}" done +for i in ${DIRS2} +do + [ -e "${i}" ] && continue + echo -n " [${i}]" + mkdir -p "${i}" + ( + cd "${i}" + for j in ../* + do + [ "`basename "${j}"`" = "CVS" ] && continue + [ -e "`basename "${j}"`" ] || ln -s "${j}" + done + rm -f "${i}" + ) +done echo " done." echo -n "Creating symlinks:" echo "${LINKS}" | while read line