From e1da4b030f2bb49366e6175809da292fd427aba0 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 20 Aug 2017 22:53:22 +0200 Subject: [PATCH] tests/themes/run.sh: use themes from build dir --- tests/themes/run.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/themes/run.sh b/tests/themes/run.sh index 21c7d1dbf..788403f94 100755 --- a/tests/themes/run.sh +++ b/tests/themes/run.sh @@ -12,6 +12,17 @@ if ! [ -f CMakeLists.txt ]; then fi source_dir="$PWD" +# Either the build dir is passed in $CMAKE_BINARY_DIR or we guess based on $PWD +# Same as in tests/run.sh. +build_dir="$CMAKE_BINARY_DIR" +if [ -z "$build_dir" ]; then + if [ -d "$source_dir/build" ]; then + build_dir="$source_dir/build" + else + build_dir="$source_dir" + fi +fi + config_file="$(mktemp)" # Cleanup on errors / aborting. @@ -28,7 +39,7 @@ for theme_file in themes/*/theme.lua; do sed "s~default/theme~$theme_name/theme~g" "awesomerc.lua" > "$config_file" AWESOME_RC_FILE="$config_file" \ - AWESOME_THEMES_PATH="$source_dir/themes" \ + AWESOME_THEMES_PATH="$build_dir/themes" \ AWESOME_ICON_PATH="$PWD/icons" \ "$source_dir/tests/run.sh" themes/tests.lua done