Sha256: 145d8b7ab4cca315e02caaef80d6e91f1feeecf925f550ebbd11aa46c3cd15a0

Contents?: true

Size: 590 Bytes

Versions: 3

Compression:

Stored size: 590 Bytes

Contents

#!/bin/bash

FILE=`mktemp -t okidok`

if [ "$1" = '-' ] ; then
 echo 'Called ok with -, assuming STDIN!'	
 cat | ricnotify yellow "OK from STDIN '$*'"
 exit $?
fi

#if "$@" |tee /tmp/ok1 2>&1 ; then
echo "`data` Start '$*'"
if "$@"  2>&1 | tee "$FILE" ; then # |tee /tmp/ok1 ; then
	verde "OK: $*"
	#echo -20 "$FILE" | ricnotify green "OK '$*'"
	tail -20 "$FILE" | growlnotify -t "OK '$*'"
	echo "`data` End (OK)"
	exit 0
else
	RET=$?
	rosso "NO(ret=$RET): $*" 
	echo "`data` End (ERR) '$*'"
	echo "There were some errors which returned: $RET" | ricnotify red "Err with '$*'"
	exit $RET
fi

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sakuric-2.1.3 bin/immature/ok2
sakuric-2.0.3 bin/immature/ok2
sakuric-2.0.1 bin/immature/ok2