Apply clang-format

This commit is contained in:
Rico Tiongson committed 2020-04-18 05:00:47 +08:00
1 parent 1ecfc79fc4
commit cb51d47a60
24 files changed
+928 -1098

No files matched your search

+9 -9
View File
@@ -5,17 +5,17 @@ set -e
function install {
# prefer running as root
local dir="$(dirname "$0")"
local program=comfortable-swipe
local program_exe=/usr/local/bin/$program
local program="comfortable-swipe"
local program_exe="/usr/local/bin/$program"
local compile_command="$dir/cpp.compile.sh"
local compile_target="$dir/command_line.cpp"
local conf_path=/usr/local/share/$program/$program.conf
local conf_path="/usr/local/share/$program/$program.conf"
local dconf_path="$dir/defaults.conf"
local old_conf_path="${XDG_CONFIG_HOME:-$HOME/.config}/$program.conf"
if [ -x "$(command -v $program_exe)" ]; then
if [ -x "$(command -v "$program_exe")" ]; then
# stop any running $program if it exists
$program_exe stop
"$program_exe" stop > /dev/null
fi
#copy config file
@@ -68,8 +68,8 @@ function install {
echo "Installing to $program_exe ..."
# remove existing $program
if [ -x "$(command -v $program_exe)" ]; then
sudo rm -f "$(which $program)"
if [ -x "$(command -v "$program_exe")" ]; then
sudo rm -f "$(which "$program")"
fi
# compile library
@@ -79,9 +79,9 @@ function install {
# GROUP=$(ls -l /dev/input/event* | awk '{print $4}' | head --line=1) || abort
# turn on autostart by default
local autostart_status="$($program_exe autostart)"
local autostart_status="$("$program_exe" autostart)"
if [[ "$autostart_status" == *off* ]]; then
autostart_status="$($program_exe autostart)"
autostart_status="$("$program_exe" autostart)"
fi
echo "Successfully installed $program $(cat $dir/VERSION | tr -d '[:space:]')"