summaryrefslogtreecommitdiff
path: root/utils.sh
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-03-31 12:42:16 +0200
committerAndreas Maunz <andreas@maunz.de>2011-03-31 12:42:16 +0200
commit59f6d70df510eb5e009f71a15ccbf20053ec7975 (patch)
tree432593286a9307daf895973d0b06121b88712647 /utils.sh
parent312d93bcc322fa5aca38f38cd266569aaf18b621 (diff)
all
Diffstat (limited to 'utils.sh')
-rw-r--r--utils.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/utils.sh b/utils.sh
index cefd0fa..0cdbc69 100644
--- a/utils.sh
+++ b/utils.sh
@@ -9,5 +9,17 @@ function check_dest {
fi
}
+function run_cmd {
+ local cmd=$1
+ local title=$2
+
+ if ! eval $cmd >>$LOG 2>&1 ; then
+ printf "%25s%15s\n" "'$title'" "FAIL"
+ exit 1
+ fi
+ printf "%25s%15s\n" "'$title'" "DONE"
+
+}
+
check_dest
source ~/.bashrc