Make errors more verbose

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2017-09-19 11:17:41 +02:00
parent 7374309c37
commit a9570cde04
Signed by: luzifer
GPG Key ID: DC2729FDD34BE99E

View File

@ -1,6 +1,12 @@
#!/bin/bash
[ -n "${TMUX}" ] && exit 1
function fail {
echo "Error: $@"
exit 1
}
[ -n "${TMUX}" ] && fail "You are already in tmux!"
( which tmux 2>/dev/null ) || fail "No tmux found, can't continue"
tmux-agent