123456789101112131415161718192021222324252627282930 |
- $OpenBSD: patch-xtoys,v 1.3 2010/03/25 22:41:44 jasper Exp $
- --- 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]} $*
|