comfortable-swipe/tests/test_compiler.sh
Rico Tiongson a7c5b6d578
Add mouse hold gestures (#79)
* Modularly separate keyboard swipe gesture from generic swipe

* Set destructors virtual to avoid surprises

* Prepare mouse swipe gesture skeleton

* Modify mouse move update

* Use xdo_move_mouse_relative instead of screen capture

* Restructure and add compiler tests

* Fix bash install script

* Add experimental: mouse hold on defaults.conf

* Update README and defaults.conf

* Do mousedown only for buttons 1 to 3

* Fix stop script and mouse gesture on button 4/5

* Redirect restart command to null

* Redirect using freopen

* Add comments on experimental scrolling
2020-04-18 03:55:13 +08:00

33 lines
612 B
Bash
Executable File

#!/bin/bash
set -ex
DIR="$(dirname "$0")"
root="$(dirname "$DIR")"
compiler="$root/cpp.compile.sh"
command_line="$root/command_line.cpp"
module="$root/comfortable_swipe"
# just call abort on error
tempout="$(mktemp)"
abort () {
rm "$tempout"
echo "Test aborted"
exit 1
}
# try to compile every cpp/hpp file in module
# header files first
# then compile cpp files
# finally, compile command line
shopt -s nullglob
for cpp in \
"$module"/**/*.h \
"$module"/**/*.hpp \
"$module"/**/*.cpp \
"$module"/lib \
"$command_line"
do
"$compiler" -c "$cpp" -o "$tempout" || abort
done