From 505f7b1cf62c6934f5246c5e62eccb0a26cb1ce2 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Sat, 11 May 2013 19:29:27 +0200 Subject: add a new script for qtc debug builds --- prepare_debug_dir.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 prepare_debug_dir.sh 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 -- cgit v1.2.3