12a3e3873SBaptiste Daroussin#!/bin/sh 2*a96ef450SBaptiste Daroussin# $Id: report-tempfile,v 1.9 2020/11/26 00:18:32 tom Exp $ 34c8945a0SNathan Whitehorn# Report results in a temporary-file. 44c8945a0SNathan Whitehorn# vile:shmode 54c8945a0SNathan Whitehorn 6*a96ef450SBaptiste Daroussincase "${returncode:-0}" in 74c8945a0SNathan Whitehorn $DIALOG_OK) 8*a96ef450SBaptiste Daroussin echo "Result: `cat "$tempfile"`";; 94c8945a0SNathan Whitehorn $DIALOG_CANCEL) 104c8945a0SNathan Whitehorn echo "Cancel pressed.";; 114c8945a0SNathan Whitehorn $DIALOG_HELP) 12*a96ef450SBaptiste Daroussin echo "Help pressed: `cat "$tempfile"`";; 134c8945a0SNathan Whitehorn $DIALOG_EXTRA) 144c8945a0SNathan Whitehorn echo "Extra button pressed.";; 154c8945a0SNathan Whitehorn $DIALOG_ITEM_HELP) 16*a96ef450SBaptiste Daroussin echo "Item-help button pressed: `cat "$tempfile"`";; 17*a96ef450SBaptiste Daroussin $DIALOG_TIMEOUT) 18*a96ef450SBaptiste Daroussin echo "Timeout expired.";; 194c8945a0SNathan Whitehorn $DIALOG_ESC) 20*a96ef450SBaptiste Daroussin if test -s "$tempfile" ; then 21*a96ef450SBaptiste Daroussin cat "$tempfile" 224c8945a0SNathan Whitehorn else 234c8945a0SNathan Whitehorn echo "ESC pressed." 244c8945a0SNathan Whitehorn fi 254c8945a0SNathan Whitehorn ;; 26*a96ef450SBaptiste Daroussin *) 27*a96ef450SBaptiste Daroussin echo "Return code was $returncode";; 284c8945a0SNathan Whitehornesac 29