2010-03-25 18:41:44 -04:00
|
|
|
$OpenBSD: patch-xtoys,v 1.3 2010/03/25 22:41:44 jasper Exp $
|
2004-01-31 16:32:18 -05:00
|
|
|
--- xtoys.orig 2003-06-30 08:36:35.000000000 +0200
|
|
|
|
+++ xtoys 2004-01-31 19:26:36.000000000 +0100
|
|
|
|
@@ -1,17 +1,16 @@
|
2000-07-24 06:35:09 -04:00
|
|
|
-#!/bin/bash
|
|
|
|
+#!/bin/sh
|
2004-01-31 16:32:18 -05:00
|
|
|
#
|
|
|
|
# /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]} $*
|