summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-05-11 19:29:27 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-05-11 19:29:27 +0200
commit505f7b1cf62c6934f5246c5e62eccb0a26cb1ce2 (patch)
tree2cfcee2894da6a9951e7b40ac4b8234379fb2bc5
parentbf083973efd101e05d75882b63aad9bdfa37dfbc (diff)
downloadsowatch-505f7b1cf62c6934f5246c5e62eccb0a26cb1ce2.tar.gz
sowatch-505f7b1cf62c6934f5246c5e62eccb0a26cb1ce2.zip
add a new script for qtc debug builds
-rwxr-xr-xprepare_debug_dir.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/prepare_debug_dir.sh b/prepare_debug_dir.sh
new file mode 100755
index 0000000..7e9e18a
--- /dev/null
+++ b/prepare_debug_dir.sh
@@ -0,0 +1,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