aboutsummaryrefslogtreecommitdiff
path: root/scripts/make-objectname-alias-symlinks.sh
blob: da5bd15cbfb9521ae975efeb61bae7f1f101a87a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/sh

pd_base="$1"
pd_base_extra="$pd_base/extra"

for file in `find "$pd_base_extra" -name '*0x*'`; do 
    cd `dirname $file`
    dir=`dirname $file`
    if [ x$dir != x$olddir ]; then
 	echo $dir
    fi
    filename=`basename $file`
    linkname=`basename $file \
        | sed 's|0x20| |g' \
        | sed 's|0x21|\\!|g' \
        | sed 's|0x22|\\"|g' \
        | sed 's|0x23|\\#|g' \
        | sed 's|0x24|\\$|g' \
        | sed 's|0x25|%|g' \
        | sed 's|0x26|\&|g' \
        | sed 's|0x28|(|g' \
        | sed 's|0x29|)|g' \
        | sed 's|0x2a|*|g' \
        | sed 's|0x2b|+|g' \
        | sed 's|0x2c|,|g' \
        | sed 's|0x2d|-|g' \
        | sed 's|0x2e|.|g' \
        | sed 's|0x2f|/|g' \
        | sed 's|0x3a|:|g' \
        | sed 's|0x3b|;|g' \
        | sed 's|0x3c|<|g' \
        | sed 's|0x3d|=|g' \
        | sed 's|0x3e|>|g' \
        | sed 's|0x3f|?|g' \
        | sed 's|0x40|@|g' \
        | sed 's|0x5e|^|g' \
        | sed 's/0x7c/|/g' \
        | sed 's|0x7e|~|g'`
#        | sed "s|\(.*\)|'\1'|g"`
#    echo "linkname == $linkname =="
    ln -s $filename $linkname
    olddir=$dir
    cd ..
done