1 |
edhill |
1.1 |
#!/bin/bash |
2 |
|
|
|
3 |
|
|
rm -rf byname |
4 |
|
|
mkdir byname |
5 |
|
|
|
6 |
|
|
# Create soft-links for all of the files based on their names |
7 |
|
|
for i in code/* |
8 |
|
|
do |
9 |
|
|
t1=`grep '^<TITLE' $i | sed -e 's/<TITLE>.\///g' | sed -e 's/<\/TITLE>//g'` |
10 |
|
|
t2=`echo $t1 | sed -e 's/\//-/g'` |
11 |
edhill |
1.2 |
if [ ! -e "./byname/"$t2".html" ]; then |
12 |
|
|
( cd byname ; ln -s "../"$i $t2".html" ) |
13 |
|
|
fi |
14 |
edhill |
1.1 |
done |
15 |
|
|
|
16 |
|
|
|
17 |
|
|
# Create soft-links for all the symbols based on their names |
18 |
|
|
for i in names/* |
19 |
|
|
do |
20 |
|
|
t1=`grep '^<TITLE' $i | cut -d '"' -f 2` |
21 |
edhill |
1.2 |
if [ ! -e "./byname/"$t1".html" ]; then |
22 |
|
|
( cd byname ; ln -s "../"$i $t1".html" ) |
23 |
|
|
fi |
24 |
edhill |
1.1 |
done |
25 |
|
|
|