blob: 7e9e18ae3387e9fbe5300e598f92e8e27fad5f1a (
plain)
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
|
#!/bin/bash
function make_symlink {
local src="$1"
local target="$2"
ln -sf "$src" "$target"
}
function make_symlinks {
local target="${@:$#}"
while [ $# -gt 1 ]; do
local src="$1"
shift
if [[ "$src" == *\** ]]; then
continue
fi
make_symlink "$src" "$target"
done
}
SCRIPT_PATH=$(readlink -f "$0")
SOWATCH_ROOT=$(dirname "$SCRIPT_PATH")
BUILD_ROOT=$(pwd)
rm -r drivers notifications watchlets
mkdir -p drivers notifications watchlets
make_symlinks $BUILD_ROOT/*/lib*driver.so drivers
make_symlinks $BUILD_ROOT/*/lib*notification.so notifications
make_symlinks $BUILD_ROOT/*/lib*watchlet.so watchlets
for i in $SOWATCH_ROOT/*; do
b="$BUILD_ROOT/$(basename $i)"
if [ -d "$i" -a -d "$b" ]; then
make_symlinks $i/*.png $i/*.qml "$b"
if [ -d "$i/res" ]; then
make_symlinks $i/res/* "$b"
fi
fi
done
|