Skip to content
Snippets Groups Projects
Commit 84498b02 authored by nimrod's avatar nimrod
Browse files

Allow running the monitor shell function with sudo.

parent 359f3975
No related branches found
No related tags found
No related merge requests found
......@@ -86,7 +86,7 @@ alias gen-mac="hexdump -n5 -e '\"02\" 5/1 \":%02X\" \"\\n\"' /dev/urandom"
alias clean-swp="find \$HOME/ -name '*.swp' -delete"
alias unssh="ssh -o \"UserKnownHostsFile /dev/null\" -o \"StrictHostKeyChecking no\""
alias todo="vim \$HOME/Documents/TODO.yml"
alias sudo="sudo "
alias sudo="sudo --preserve-env=PATH"
alias git="git "
alias xargs="xargs "
alias presentation='docker dev adarnimrod/presentation'
......@@ -130,15 +130,6 @@ for line in stdin.readlines():
fi
}
monitor () {
if eval "$@"
then
notify-send "${1#__} has finished."
else
notify-send --urgency=critical "${1#__} has failed."
fi
}
# shellcheck disable=SC2120
json_tool () {
if [ -t 0 ]
......
#!/bin/sh
set -eu
[ "$#" -eq "0" ] || exit 0
if eval "$@"
then
notify-send "${1#__} has finished."
else
notify-send --urgency=critical "${1#__} has failed."
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment