+create_tempfile() {
+ if `type tempfile 2>&1 >/dev/null`; then
+ THETMP=`tempfile --prefix=bsetbg`
+ elif `type mktemp 2>&1 >/dev/null`; then
+ THETMP=`mktemp -t bsetbg`
+ else
+ THETMP=/tmp/.bsetbg.$$
+ if [ -f $THETMP ]; then
+ rm -f $THETMP
+ fi
+ touch $THETMP
+ chmod 600 $THETMP
+ fi
+ TMPFILE=$THETMP
+}
+