1 |
#! /bin/sh |
2 |
DIRS="img/news img/bolesti img/autori pdf templates_c med/templates_c" |
3 |
LINKS=". edit |
4 |
. med/edit |
5 |
../index.html img/bolesti/index.html |
6 |
../index.html img/autori/index.html |
7 |
../index.html img/news/index.html |
8 |
../img/index.html pdf/index.html |
9 |
../pdf med/pdf |
10 |
../inc med/inc |
11 |
../fonts med/fonts |
12 |
../js med/js |
13 |
../img/news med/img/news |
14 |
../img/bolesti med/img/bolesti |
15 |
../img/autori med/img/autori |
16 |
../../templates/edit.tpl med/templates/edit.tpl |
17 |
../../templates/links.tpl med/templates/links.tpl |
18 |
../../templates/wrapper.tpl med/templates/wrapper.tpl |
19 |
../../templates/print.tpl med/templates/print.tpl |
20 |
../../templates/footer.tpl med/templates/print.tpl |
21 |
../index.php med/index.php |
22 |
../legal.php med/legal.php |
23 |
../verdanab.ttf med/verdanab.ttf |
24 |
../button.php med/button.php" |
25 |
# ------------- |
26 |
cd "`dirname "${0}"`" |
27 |
echo -n "Creating dirs:" |
28 |
for i in ${DIRS} |
29 |
do |
30 |
[ -e "${i}" ] && continue |
31 |
echo -n " [${i}]" |
32 |
mkdir -p "${i}" |
33 |
chmod 777 "${i}" |
34 |
done |
35 |
echo " done." |
36 |
echo -n "Creating symlinks:" |
37 |
echo "${LINKS}" | while read line |
38 |
do |
39 |
set -- ${line} |
40 |
[ -z "${1}" ] && continue |
41 |
[ -z "${2}" ] && continue |
42 |
[ -e "${2}" ] && continue |
43 |
echo -n " [${2}]" |
44 |
ln -s "${1}" "${2}" |
45 |
done |
46 |
echo " done." |
47 |
exit "${?}" |