Magellan Linux

Diff of /trunk/installer-simple/functions/common-dialogs.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2394 by niro, Tue Jan 7 12:58:09 2014 UTC revision 2395 by niro, Tue Jan 7 12:59:51 2014 UTC
# Line 39  messagebox() Line 39  messagebox()
39   --msgbox "${text}" "${height}" "${width}"   --msgbox "${text}" "${height}" "${width}"
40  }  }
41    
42    infobox()
43    {
44     local header
45     local text
46     local height
47     local width
48    
49     # very basic getops
50     local OPTIND opt
51     while getopts ":h:y:x:" opt
52     do
53     case ${opt} in
54     h) header="${OPTARG}" ;;
55     y) height="${OPTARG}" ;;
56     x) width="${OPTARG}" ;;
57     esac
58     done
59     shift $((OPTIND-1))
60     text="$@"
61    
62     #[[ -z ${header} ]] && die "no header given"
63     [[ -z ${text} ]] && die "no text given"
64     [[ -z ${height} ]] && height=3
65     [[ -z ${width} ]] && width=70
66    
67     dialog \
68     --colors \
69     --title "${header}" \
70     --backtitle "${TITLE}" \
71     --infobox "${text}" "${height}" "${width}"
72    }
73    
74  inputbox()  inputbox()
75  {  {
76   local header   local header

Legend:
Removed from v.2394  
changed lines
  Added in v.2395