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
48
|
#!/usr/bin/env bash
# Get the directory of this script.
CWD_SOURCE="${BASH_SOURCE[0]}"
while [ -h "$CWD_SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$CWD_SOURCE" )" >/dev/null 2>&1 && pwd )"
CWD_SOURCE="$(readlink "$CWD_SOURCE")"
[[ $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
done
CWD="$( cd -P "$( dirname "$CWD_SOURCE" )" >/dev/null 2>&1 && pwd )"
SOURCES_DIRS=(
"src/"
"src/common/"
"src/libvqdr/"
"src/libvqdr/function/"
"src/libvqdr/value/"
"src/libvqdr/operator/"
"build/libvqdr.so.p/"
"build/libvqdr.so.p/src/"
"build/libvqdr.so.p/src/common/"
"build/libvqdr.so.p/src/libvqdr/"
"build/libvqdr.so.p/src/libvqdr/function/"
"build/libvqdr.so.p/src/libvqdr/operator/"
"build/libvqdr.so.p/src/libvqdr/value/"
"build/tests/"
"build/tests/test1.p/"
"build/tests/test2.p/"
)
SOURCES_DIRS2=()
for val in "${SOURCES_DIRS[@]}"
do
SOURCES_DIRS2+=("$CWD/$val")
done
# for val in "${SOURCES_DIRS2[@]}"
# do
# echo $val
# if [ ! -d $val ]
# then
# echo "could not find it."
# fi
# done
|