#!@BASH@
+# -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*-
# copyright 2002 lmoore@tump.com under the terms of the GNU LGPL.
# additions 2005 collective@riseup.net
}
inputBox() {
- local temp=$(mktemp -t) || exit 1
+ local temp=$(@MKTEMP@ -t backupninja.XXXXXX) || exit 1
trap "rm -f $temp" 0
REPLY=
$DIALOG --backtitle "$BACKTITLE" --title "$1" \
local title=$1
local text=$2
shift 2
- local temp=$(mktemp -t) || exit 1
+ local temp=$(@MKTEMP@ -t backupninja.XXXXXX) || exit 1
trap "rm -f $temp" 0
REPLY=
$DIALOG $HELP $_DEFAULT --backtitle "$BACKTITLE" --title "$title" \
}
passwordBox() {
- local temp=$(mktemp -t) || exit 1
+ local temp=$(@MKTEMP@ -t backupninja.XXXXXX) || exit 1
trap "rm -f $temp" 0
REPLY=
$DIALOG --backtitle "$BACKTITLE" --title "$1" \
##
listDisplay() {
boxtype=$1
- local temp=$(mktemp -t) || exit 1
+ local temp=$(@MKTEMP@ -t backupninja.XXXXXX) || exit 1
trap "rm -f $temp" 0
local label
}
formDisplay() {
- local temp=$(mktemp -t) || exit 1
+ local temp=$(@MKTEMP@ -t backupninja.XXXXXX) || exit 1
max_length=0
for ((i=0; i < ${#_form_labels[@]} ; i++)); do
) | xargs $DIALOG 2> $temp
local status=$?
+ ##
+ ## the exit status is meaningless, it is always 0.
+ ## i can't figure out how to get the exit status of dialog
+ ## if we do "dialog `arg code`" or "dialog $args", then the quotes
+ ## get messed up and dialog won't run.
+ ## if we do "(arg code) | xargs dialog", then the exit status is
+ ## swallowed by xargs. xargs should return different exit status
+ ## depending on the exit status of the command run, but i have
+ ## never been able to get that to work.
+ ##
+
REPLY=
if [ $status = 0 ]; then
IFS=$''