Use script_framework for resume script

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2017-09-19 12:55:43 +02:00
parent eeb4ba2d79
commit a2727dbe89
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
2 changed files with 8 additions and 6 deletions

View file

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

View file

@ -7,8 +7,9 @@ function error {
echo -e "${COLOR_RED}$@${COLOR_PLAIN}"
}
function success {
echo -e "${COLOR_GREEN}$@${COLOR_PLAIN}"
function fail {
error "Error: $@"
exit 1
}
function info {
@ -18,3 +19,7 @@ function info {
function step {
info "[$(date +%H:%M:%S)] $@"
}
function success {
echo -e "${COLOR_GREEN}$@${COLOR_PLAIN}"
}