Simplify compile command structure

This commit is contained in:
Rico Tiongson 2019-02-12 19:07:30 +08:00
parent 602b148fb4
commit 7923effa02
4 changed files with 4 additions and 3 deletions

2
comfortable-swipe.compile.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
g++ $(dirname $0)/comfortable-swipe.cpp -std=c++11 -O2 -lxdo -Wno-unused-result -o $1

View File

@ -1,2 +0,0 @@
#!/bin/sh
g++ $(dirname $0)/main.cpp -std=c++11 -O2 -lxdo -Wno-unused-result -o $1

View File

@ -2,6 +2,7 @@
# prefer running as root
DIR=$(dirname $0)
PROGRAM=/usr/local/bin/comfortable-swipe
COMPILE=$DIR/comfortable-swipe.compile.sh
CONF_PATH=/usr/local/share/comfortable-swipe/comfortable-swipe.conf
DCONF_PATH=$DIR/defaults.conf
OLD_CONF_PATH=${XDG_CONFIG_HOME:-$HOME/.config}/comfortable-swipe.conf
@ -50,7 +51,7 @@ if [ -x "$(command -v $PROGRAM)" ]; then
fi
# compile library
sudo $DIR/compile.sh $PROGRAM || abort
sudo $COMPILE $PROGRAM || abort
# add permissions to input group (defer)
# GROUP=$(ls -l /dev/input/event* | awk '{print $4}' | head --line=1) || abort