openbsd-ports/games/xteddy/patches/patch-xtoys
pvalchev 5f89f38148 Update to 2.0.2; Aleksander Piotrowski <aleksander.piotrowski@nic.com.pl>
* GPL license. set *_CDROM to Yes
 * perl instead of sed in post-patch. It's shorter
 * new xtoys. Old one didn't work for me
fixes a disappeared distfile issue too
2004-01-31 21:32:18 +00:00

29 lines
727 B
Plaintext

--- xtoys.orig 2003-06-30 08:36:35.000000000 +0200
+++ xtoys 2004-01-31 19:26:36.000000000 +0100
@@ -1,17 +1,16 @@
-#!/bin/bash
+#!/bin/sh
#
# /usr/bin/X11/xtoys -- puts a random cuddly toy onto desktop
#
# Thanks to Andrew Stribblehill <a.d.stribblehill@dur.ac.uk>
# who supported this script
#
-if [ -d /usr/local/share/xteddy ] ; then
- images=(`ls /usr/share/xteddy` `ls /usr/local/share/xteddy 2> /dev/null`)
-else
- images=(`ls /usr/share/xteddy`)
-fi
+i=0
+for img in `ls !!PREFIX!!/share/xteddy`; do
+ images[$i]=$img
+ i=`expr $i + 1`
+done
-num=${#images[*]}
-choice=`expr $RANDOM % $num`
+choice=`expr $RANDOM % $i`
-/usr/games/xteddy -F${images[choice]} $*
+!!PREFIX!!/bin/xteddy -F${images[choice]} $*