dragora-installer: More enhancements
[dragora.git] / archive / dragora-installer / parts / ShowSeries
blob3fa498cd369cd05e2a3dabfbeb67cd03384f226e
1 # This file is part of the 'dragora-installer'.
3 # Purpose: Search to show the detected series of the found medium.
5 MEDIUM_SOURCE="$(cat -- ${SUBTMPDIR}/MediumFound)"
6 export MEDIUM_SOURCE
8 cat << EOF > ${SUBTMPDIR}/ShowSeries
9 dialog --colors \\
10  --backtitle "\ZbChoosing the series" \\
11  --title "SOFTWARE SERIES" \\
12  --no-cancel --item-help --checklist \\
13 "The following series of software were found for installation.\n\n\\
14 Use the cursor keys and \\Z3[Space]\\Zn to deselect the software series\n\\
15 that you do not want to include.  Once ready, press \\Z3[Enter]\Zn to \
16 continue..." $(( LINES - 5 )) 68 12 \\
17 EOF
19 find -- "$MEDIUM_SOURCE" -type f \( -name '*@*.tlz' -a ! -name '*-pass*' \) \
20  -exec sh -c 'name="${1##*@}"; name="${name%.tlz}"; echo "$name"' _ {} \; | \
21   sort -u | while read -r category
23     case $category in
24     boot*)
25         echo '"boot" "" ON "Necessary software to boot the system." \' >> ${SUBTMPDIR}/ShowSeries
26         ;;
27     compressors*)
28         echo '"compressors" "" ON "Several compressors at user-level." \' >> ${SUBTMPDIR}/ShowSeries
29         ;;
30     daemons*)
31         echo '"daemons" "" ON "System-related daemons." \' >> ${SUBTMPDIR}/ShowSeries
32         ;;
33     data*)
34         echo '"data" "" ON "Essential configuration files." \' >> ${SUBTMPDIR}/ShowSeries
35         ;;
36     db*)
37         echo '"db" "" ON "Databases such as BerkeleyDB, GDBM, and the system Time Zone Database (tzdb)." \' >> ${SUBTMPDIR}/ShowSeries
38         ;;
39     devel*)
40         echo '"devel" "" ON "Compilers, programming languages and debuggers." \' >> ${SUBTMPDIR}/ShowSeries
41         ;;
42     dict*)
43         echo '"dict" "" ON "Spell checker software and dictionaries." \' >> ${SUBTMPDIR}/ShowSeries
44         ;;
45     docbook*)
46         echo '"docbook" "" ON "SGML and XML support for DocBook documents." \' >> ${SUBTMPDIR}/ShowSeries
47         ;;
48     gnupg*)
49         echo '"gnupg" "" ON "The GNU privacy guard." \' >> ${SUBTMPDIR}/ShowSeries
50         ;;
51     kernel*)
52         echo '"kernel" "" ON "The Linux-libre kernel and related." \' >> ${SUBTMPDIR}/ShowSeries
53         ;;
54     libs*)
55         echo '"libs" "" ON "The system libraries." \' >> ${SUBTMPDIR}/ShowSeries
56         ;;
57     lua*)
58         echo '"lua" "" ON "The Lua programming language and modules." \' >> ${SUBTMPDIR}/ShowSeries
59         ;;
60     networking*)
61         echo '"networking" "" ON "Clients and servers for networking." \' >> ${SUBTMPDIR}/ShowSeries
62         ;;
63     perl*)
64         echo '"perl" "" ON "The Perl programming language and modules." \' >> ${SUBTMPDIR}/ShowSeries
65         ;;
66     python*)
67         echo '"python" "" ON "The Python programming language and modules." \' >> ${SUBTMPDIR}/ShowSeries
68         ;;
69     ruby*)
70         echo '"ruby" "" ON "The Ruby programming language and modules." \' >> ${SUBTMPDIR}/ShowSeries
71         ;;
72     shells*)
73         echo '"shells" "" ON "Command interpreters for the system." \' >> ${SUBTMPDIR}/ShowSeries
74         ;;
75     tools*)
76         echo '"tools" "" ON "Tools and complements of the base system." \' >> ${SUBTMPDIR}/ShowSeries
77         ;;
78     x-apps*)
79         echo '"x-apps" "" ON "A useful collection of applications for the X Window System." \' >> ${SUBTMPDIR}/ShowSeries
80         ;;
81     x-libs*)
82         echo '"x-libs" "" ON "A useful collection of libraries for the X Window System." \' >> ${SUBTMPDIR}/ShowSeries
83         ;;
84     xorg_app*)
85         echo '"xorg_app" "" ON "The X Window System applications." \' >> ${SUBTMPDIR}/ShowSeries
86         ;;
87     xorg_data*)
88         echo '"xorg_data" "" ON "Bitmaps, cursor themes and configuration files." \' >> ${SUBTMPDIR}/ShowSeries
89         ;;
90     xorg_doc*)
91         echo '"xorg_doc" "" ON "The X Window System documentation." \' >> ${SUBTMPDIR}/ShowSeries
92         ;;
93     xorg_driver*)
94         echo '"xorg_driver" "" ON "Video and Input drivers for the X Window System." \' >> ${SUBTMPDIR}/ShowSeries
95         ;;
96     xorg_extra*)
97         echo '"xorg_extra" "" ON "Extra libraries and essential utilities for the X Window System." \' >> ${SUBTMPDIR}/ShowSeries
98         ;;
99     xorg_font*)
100         echo '"xorg_font" "" ON "The X Window System font files." \' >> ${SUBTMPDIR}/ShowSeries
101         ;;
102     xorg_lib*)
103         echo '"xorg_lib" "" ON "The X Window System libraries." \' >> ${SUBTMPDIR}/ShowSeries
104         ;;
105     xorg_mesa*)
106         echo '"xorg_mesa" "" ON "The Mesa 3D graphics library." \' >> ${SUBTMPDIR}/ShowSeries
107         ;;
108     xorg_proto*)
109         echo '"xorg_proto" "" ON "The X Window System header(s) for development." \' >> ${SUBTMPDIR}/ShowSeries
110         ;;
111     xorg_util*)
112         echo '"xorg_util" "" ON "The X Window System utilities." \' >> ${SUBTMPDIR}/ShowSeries
113         ;;
114     xorg_xcb*)
115         echo '"xorg_xcb" "" ON "The XCB protocol." \' >> ${SUBTMPDIR}/ShowSeries
116         ;;
117     xorg_xserver*)
118         echo '"xorg_xserver" "" ON "The X Window System server." \' >> ${SUBTMPDIR}/ShowSeries
119         ;;
120     *)
121         echo "\"${category}\" \"\" ON \"Description not available.\" \\" >> ${SUBTMPDIR}/ShowSeries
122         ;;
123     esac
124 done
126 # Check if there are any detected series
127 if test ! -f ${SUBTMPDIR}/ShowSeries || test ! -s ${SUBTMPDIR}/ShowSeries
128 then
129     echo "${PROGRAM}: Error no series found.  Aborting..." 1>&2
130     exit 99;
132 echo ' 2> ${SUBTMPDIR}/return-ShowSeries' >> ${SUBTMPDIR}/ShowSeries
134 touch ${SUBTMPDIR}/return-ShowSeries
136 . ${SUBTMPDIR}/ShowSeries;      # Show menu.
137 if test ! -f ${SUBTMPDIR}/return-ShowSeries || test ! -s ${SUBTMPDIR}/return-ShowSeries
138 then
139     echo "${PROGRAM}: No series were selected.  Aborting..." 1>&2
140     exit 99;
143 # Append a new line for reading (this will be done from 'InstallPackages')
144 echo "" >> ${SUBTMPDIR}/return-ShowSeries