Subversion Repositories HelenOS

Rev

Rev 3028 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3028 Rev 3888
1
#!/bin/bash
1
#!/bin/bash
2
 
2
 
3
# by Alf
3
# by Alf
4
# This script solves malfunction of symlinks in cygwin
4
# This script solves malfunction of symlinks in cygwin
5
# 
5
# 
6
# Download sources from repository and than run this script to correct symlinks 
6
# Download sources from repository and than run this script to correct symlinks 
7
#   to be able compile project
7
#   to be able compile project
8
 
8
 
9
 
9
 
10
if uname | grep 'CYGWIN' > /dev/null; then
10
if uname | grep 'CYGWIN' > /dev/null; then
11
    echo "Good ... you have cygwin"
11
    echo "Good ... you have cygwin"
12
else
12
else
13
    echo "Wrong. This script is only for cygwin"
13
    echo "Wrong. This script is only for cygwin"
14
    exit
14
    exit
15
fi
15
fi
16
 
16
 
17
for linkName in `find . ! -iwholename '.*svn*' ! -type d -print`; do
17
for linkName in `find . ! -iwholename '.*svn*' ! -type d -print`; do
18
    if head -n 1 $linkName | grep '^link' > /dev/null; then
18
    if head -n 1 $linkName | grep '^link' > /dev/null; then
19
        linkTarget=`head -n 1 $linkName | sed 's/^link //'`
19
        linkTarget=`head -n 1 $linkName | sed 's/^link //'`
20
        echo $linkName " -> " $linkTarget
20
        echo $linkName " -> " $linkTarget
21
        rm $linkName
21
        rm $linkName
22
        ln -s "$linkTarget" "$linkName"
22
        ln -s "$linkTarget" "$linkName"
23
    fi  
23
    fi  
24
done
24
done
25
 
25