From 7923effa021508060c90fcd2198d9002998701f2 Mon Sep 17 00:00:00 2001 From: Rico Tiongson Date: Tue, 12 Feb 2019 19:07:30 +0800 Subject: [PATCH] Simplify compile command structure --- comfortable-swipe.compile.sh | 2 ++ main.cpp => comfortable-swipe.cpp | 0 compile.sh | 2 -- install | 3 ++- 4 files changed, 4 insertions(+), 3 deletions(-) create mode 100755 comfortable-swipe.compile.sh rename main.cpp => comfortable-swipe.cpp (100%) delete mode 100755 compile.sh diff --git a/comfortable-swipe.compile.sh b/comfortable-swipe.compile.sh new file mode 100755 index 0000000..d839b64 --- /dev/null +++ b/comfortable-swipe.compile.sh @@ -0,0 +1,2 @@ +#!/bin/sh +g++ $(dirname $0)/comfortable-swipe.cpp -std=c++11 -O2 -lxdo -Wno-unused-result -o $1 diff --git a/main.cpp b/comfortable-swipe.cpp similarity index 100% rename from main.cpp rename to comfortable-swipe.cpp diff --git a/compile.sh b/compile.sh deleted file mode 100755 index d426b80..0000000 --- a/compile.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -g++ $(dirname $0)/main.cpp -std=c++11 -O2 -lxdo -Wno-unused-result -o $1 diff --git a/install b/install index 6f9cf51..bc8083b 100755 --- a/install +++ b/install @@ -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