Subversion Repositories HelenOS

Rev

Rev 3022 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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