Autokiss now shuffles if possible
authorHarvie <tomas@mudrunka.cz>
Tue, 24 Aug 2010 01:10:54 +0000 (03:10 +0200)
committerHarvie <tomas@mudrunka.cz>
Tue, 24 Aug 2010 01:10:54 +0000 (03:10 +0200)
purple/answerscripts.d/autokiss.sh

index 46dc7126e7b9e07aec3056195837da539f533b87..572dc928f6cda7e8f6b6c274fedc25d36091eacb 100755 (executable)
@@ -1,3 +1,4 @@
 #!/bin/sh
 #AutoKiss :-* (just wanna be polite)
-echo $(echo "$ANSW_MSG" | grep -Eo ':-\*|\*IN LOVE\*|:-\{\}|\*KISSING\*');
+shuf="$(which shuf 2>/dev/null)"; [ -x "$shuf" ] || shuf="cat"; #shuffle if possible
+echo $(echo "$ANSW_MSG" | grep -Eo ':-\*|\*IN LOVE\*|:-\{\}|\*KISSING\*' | "$shuf" );
This page took 0.131941 seconds and 4 git commands to generate.