bzr branch
http://gegoxaren.bato24.eu/bzr/vqdr/trunk
45
by Gustav Hartvigsson
* woopes. |
1 |
#!/usr/bin/env bash
|
2 |
||
3 |
# Get the directory of this script.
|
|
4 |
||
5 |
CWD_SOURCE="${BASH_SOURCE[0]}" |
|
6 |
while [ -h "$CWD_SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink |
|
7 |
DIR="$( cd -P "$( dirname "$CWD_SOURCE" )" >/dev/null 2>&1 && pwd )" |
|
8 |
CWD_SOURCE="$(readlink "$CWD_SOURCE")" |
|
9 |
[[ $SCWD_OURCE != /* ]] && CWD_SOURCE="$DIR/$CWD_SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located |
|
10 |
done
|
|
11 |
CWD="$( cd -P "$( dirname "$CWD_SOURCE" )" >/dev/null 2>&1 && pwd )" |
|
12 |
||
51
by Gustav Hartvigsson
Fixed run_gdb.sh (sort-of) |
13 |
declare -a SOURCES_DIRS=( |
45
by Gustav Hartvigsson
* woopes. |
14 |
"src/" |
15 |
"src/common/" |
|
16 |
"src/libvqdr/" |
|
17 |
"src/libvqdr/function/" |
|
18 |
"src/libvqdr/value/" |
|
19 |
"src/libvqdr/operator/" |
|
20 |
"build/libvqdr.so.p/" |
|
21 |
"build/libvqdr.so.p/src/" |
|
53
by Gustav Hartvigsson
Woops. |
22 |
"build/libvqdr.so.p/src/utils/" |
45
by Gustav Hartvigsson
* woopes. |
23 |
"build/libvqdr.so.p/src/libvqdr/" |
24 |
"build/libvqdr.so.p/src/libvqdr/function/" |
|
25 |
"build/libvqdr.so.p/src/libvqdr/operator/" |
|
26 |
"build/libvqdr.so.p/src/libvqdr/value/" |
|
27 |
"build/tests/" |
|
28 |
"build/tests/test1.p/" |
|
29 |
"build/tests/test2.p/" |
|
53
by Gustav Hartvigsson
Woops. |
30 |
"build/tests/utils/" |
45
by Gustav Hartvigsson
* woopes. |
31 |
)
|
32 |
||
51
by Gustav Hartvigsson
Fixed run_gdb.sh (sort-of) |
33 |
declare -a SOURCES_DIRS2=() |
34 |
||
35 |
# build param string
|
|
36 |
PARAM_STR="" |
|
37 |
||
38 |
for str in "${SOURCES_DIRS[@]}"; do |
|
39 |
PARAM_STR+=" --directory " |
|
40 |
PARAM_STR+="${str}" |
|
41 |
done
|
|
42 |
||
45
by Gustav Hartvigsson
* woopes. |
43 |
|
44 |
for val in "${SOURCES_DIRS[@]}" |
|
45 |
do
|
|
46 |
SOURCES_DIRS2+=("$CWD/$val") |
|
47 |
done
|
|
48 |
||
49 |
# for val in "${SOURCES_DIRS2[@]}"
|
|
50 |
# do
|
|
51 |
# echo $val
|
|
52 |
# if [ ! -d $val ]
|
|
53 |
# then
|
|
54 |
# echo "could not find it."
|
|
55 |
# fi
|
|
56 |
# done
|
|
57 |
||
51
by Gustav Hartvigsson
Fixed run_gdb.sh (sort-of) |
58 |
gdb $PARAM_STR $@ |