summaryrefslogtreecommitdiffstats
path: root/wayland.sh
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-05-14 08:19:03 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-05-14 08:19:03 +0200
commit64337f947d560c5a1fa064d709e6d2e0a6deb348 (patch)
tree123c395a595db7de90e0497fed3664114bfde20d /wayland.sh
parentd397cae0b425199d161a969235bcbc6866f5974b (diff)
downloadbin-64337f947d560c5a1fa064d709e6d2e0a6deb348.zip
bin-64337f947d560c5a1fa064d709e6d2e0a6deb348.tar.gz
wayland.sh: change log behavior
Diffstat (limited to 'wayland.sh')
-rwxr-xr-xwayland.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/wayland.sh b/wayland.sh
index e09771c..50a1457 100755
--- a/wayland.sh
+++ b/wayland.sh
@@ -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