* Add simplified shell script * Update stop command * Update defaults.conf * Add help dialog * Simplify file checkpoint * Improve tests * Remove old library files * Update install log * Bump to version 1.2.0 * Apply clang format * Add command line tools for configurations * Bugfix keyswipe gesture not passing test * Reformat files with clang and prettier * Update dispatch script * Add abort statuement * Improve command line * Add --bare flag * Apply clang-format * Update README * Add to CHANGELOG for v1.2.0
38 lines
914 B
Bash
38 lines
914 B
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
function trysudo {
|
|
$@ 2> /dev/null || sudo $@
|
|
}
|
|
|
|
function uninstall {
|
|
TARGET="${1?missing uninstall parameter}"
|
|
if [[ -f "$TARGET" ]]; then
|
|
trysudo rm -f "$TARGET"
|
|
echo "Removed: $TARGET"
|
|
elif [[ ! -z "$TARGET" ]]; then
|
|
echo "Not found: $TARGET"
|
|
fi
|
|
}
|
|
|
|
# stop program first if it is still running
|
|
comfortable-swipe stop 2> /dev/null || true
|
|
|
|
# uninstall binaries
|
|
uninstall "$(which comfortable-swipe || echo /usr/share/bin/comfortable-swipe)"
|
|
uninstall "$(which comfortable-swipe-buffer || echo /usr/share/bin/comfortable-swipe-buffer)"
|
|
|
|
# uninstall desktop file
|
|
uninstall "$HOME/.config/autostart/comfortable-swipe.desktop"
|
|
|
|
# tell user we are keeping configuration file
|
|
CONF_TARGET="$HOME/.config/comfortable-swipe.conf"
|
|
if [ -f "$CONF_TARGET" ]; then
|
|
echo "Keeping your configuration file: $CONF_TARGET"
|
|
fi
|
|
|
|
cat <<EOF
|
|
Successfully uninstalled comfortable-swipe
|
|
EOF
|