diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-14 08:19:03 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-14 08:19:03 +0200 |
commit | 64337f947d560c5a1fa064d709e6d2e0a6deb348 (patch) | |
tree | 123c395a595db7de90e0497fed3664114bfde20d /wayland.sh | |
parent | d397cae0b425199d161a969235bcbc6866f5974b (diff) | |
download | bin-64337f947d560c5a1fa064d709e6d2e0a6deb348.zip bin-64337f947d560c5a1fa064d709e6d2e0a6deb348.tar.gz |
wayland.sh: change log behavior
Diffstat (limited to 'wayland.sh')
-rwxr-xr-x | wayland.sh | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -32,14 +32,16 @@ GREEN="\033[0;32m" function say () { echo -e "$GREEN$1$RESET"; } -function error () { echo -e "${RED}FAILURE${RESET} $1" && exit 1; } +function abort () { echo -e "${RED}ABORT${RESET} $1" && exit 1; } + +function error () { echo -e "${RED}FAILURE${RESET} $1"; } sudo -K TMP=/tmp/sudo.test [ -e "$TMP" ] && rm -f "$TMP" echo "$SUDO_PASSWD" | sudo -S touch "$TMP" &>/dev/null if [ ! -e "$TMP" ]; then - error "cmdline provided sudo password failed!" + abort "cmdline provided sudo password failed!" else echo "$SUDO_PASSWD" | sudo -S rm -f "$TMP" fi @@ -74,7 +76,6 @@ function do_your_job () { else say " * clone $my_src" && git clone "$my_src" "$my_dir" && cd "$my_dir" && autogen && cd .. || error fi - say " * SUCCESS\n" } cd $BUILD_DIR || exit 1 |