OpenCores
URL https://opencores.org/ocsvn/minsoc/minsoc/trunk

Subversion Repositories minsoc

[/] [minsoc/] [trunk/] [prj/] [scripts/] [simvhdl.sh] - Blame information for rev 130

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 104 rfajardo
#!/bin/bash
2
 
3
#system workings
4
MINSOC_DIR=`pwd`/..
5
 
6
PROJECT=$1
7
OUTPUT=$2
8
 
9 108 rfajardo
ENV=`uname -o`
10
 
11
function adaptpath
12
{
13
    if [ "$ENV" == "Cygwin" ]
14
    then
15
        local cygpath=`cygpath -w $1`
16
        local result=`echo $cygpath | sed 's/\\\\/\\//g'`
17
        echo "$result"
18
    else
19
        echo "$1"
20
    fi
21
}
22
 
23 104 rfajardo
if [ ! -f $PROJECT ]
24
then
25
    echo "Unexistent project file."
26
    exit 1
27
fi
28
 
29
if [ -z "$OUTPUT" ]
30
then
31
    echo "Second argument should be the destintion file for the file and directory inclusions."
32
    exit 1
33
fi
34
echo -n "" > $OUTPUT
35
 
36
source $PROJECT
37
 
38
for file in "${PROJECT_SRC[@]}"
39
do
40
    FOUND=0
41
 
42
    for dir in "${PROJECT_DIR[@]}"
43
    do
44
        if [ -f $MINSOC_DIR/$dir/$file ]
45
        then
46 108 rfajardo
            adapted_file=`adaptpath $MINSOC_DIR/$dir/$file`
47
            echo "$adapted_file" >> $OUTPUT
48 104 rfajardo
            FOUND=1
49
            break
50
        fi
51
    done
52
 
53
    if [ $FOUND != 1 ]
54
    then
55
        echo "FILE NOT FOUND"
56
        exit 1
57
    fi
58
done

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.