Use script_framework for resume script
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
eeb4ba2d79
commit
a2727dbe89
2 changed files with 8 additions and 6 deletions
|
@ -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"
|
||||
|
|
|
@ -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}"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue