clipctl: Fix tests

We now use clipctl in tests and must account for using the local
version.
This commit is contained in:
Chris Down 2021-01-29 01:16:45 +00:00
parent 17823bacea
commit 333ebc513d
2 changed files with 4 additions and 3 deletions

View file

@ -22,7 +22,7 @@ clipmenud_pid=$(pgrep -u "$(id -u)" -nf 'clipmenud$')
case $1 in
enable|disable|toggle|status)
if [[ -z "$clipmenud_pid" ]]; then
echo "clipmenud is not running"
echo "clipmenud is not running" >&2
exit 2
fi
;;
@ -46,7 +46,7 @@ case $1 in
version) echo "$major_version" ;;
cache-dir) echo "$cache_dir" ;;
*)
printf 'Unknown command: %s\n' "$1"
printf 'Unknown command: %s\n' "$1" >&2
exit 1
;;
esac

View file

@ -4,7 +4,7 @@ set -x
set -e
set -o pipefail
dir=$(clipctl cache-dir)
dir=$(./clipctl cache-dir)
cache_file=$dir/line_cache
if [[ $0 == /* ]]; then
@ -47,6 +47,7 @@ rofi() {
alias xsel='shim xsel'
alias xclip='shim xclip'
alias clipctl='./clipctl'
EOF
chmod a+x /tmp/clipmenu