Debian Codegraph @

samples/form1-help

raw symbols SCIP
1 #! /bin/shscip-shell filesystem . . `/bin/sh`.
2 # $Id: form1-help,v 1.8 2020/11/26 00:33:42 tom Exp $
3
4 . ./setup-varsscip-shell source . . `./setup-vars`.
5
6 backtitle="An Example for the use of --form:"
7
8 ids=`idscip-shell system . . id.|sedscip-shell system . . sed. -e 's/([^)]*)//g'`
9 uid=`echoscip-shell system . . echo. "$ids" | sedscip-shell system . . sed. -e 's/^uid=//' -e 's/ .*//'`
10 gid=`echoscip-shell system . . echo. "$ids" | sedscip-shell system . . sed. -e 's/^.* gid=//' -e 's/ .*//'`
11
12 user="$USER"
13 home="$HOME"
14
15 returncode=0
16 while testscip-shell system . . test. $returncode != 1 && testscip-shell system . . test. $returncode != 250
17 do
18 exec 3>&1
19 returntext=`$DIALOG --ok-label "Submit" \
20 --help-button \
21 --backtitle "$backtitle" "$@" \
22 --form "Here is a possible piece of a configuration program." \
23 20 50 0 \
24 "Username:" 1 1 "$user" 1 10 10 0 \
25 "UID:" 2 1 "$uid" 2 10 8 0 \
26 "GID:" 3 1 "$gid" 3 10 8 0 \
27 "HOME:" 4 1 "$home" 4 10 40 0 \
28 2>&1 1>&3`
29 returncode=$?
30 exec 3>&-
31
32 show=`echoscip-shell system . . echo. "$returntext" |sedscip-shell system . . sed. -e 's/^/ /'`
33
34 case $returncode in
35 $DIALOG_CANCEL)
36 "$DIALOG" \
37 --clear \
38 --backtitle "$backtitle" \
39 --yesno "Really quit?" 10 30
40 case $? in
41 $DIALOG_OK)
42 break
43 ;;
44 $DIALOG_CANCEL)
45 returncode=99
46 ;;
47 esac
48 ;;
49 $DIALOG_OK)
50 "$DIALOG" \
51 --clear \
52 --backtitle "$backtitle" --no-collapse --cr-wrap \
53 --msgbox "Resulting data:\n\
54 $show" 10 40
55 ;;
56 *)
57 . ./report-buttonscip-shell source . . `./report-button`.
58 exit
59 ;;
60 esac
61 done