This commit is contained in:
teldra 2022-02-07 06:06:31 +01:00
parent 642a83b501
commit 01197c190e
2 changed files with 22 additions and 1 deletions

3
etc/printing/cups Normal file
View File

@ -0,0 +1,3 @@
packages() {
addpkg "cups"
}

20
main.sh
View File

@ -247,7 +247,25 @@ profile() {
}
printing() {
yesno "Do you want printing?" "n"
for i in $(find ./etc/printing/ -type f); do
printing+=("$(basename $i)")
done
if [ "${#printing[@]}" -ge "1" ]; then
if yesno "Do you want printing?" "n"; then
if [ "${#printing[@]}" -gt "1" ]; then
multiplechoice "${printing[@]}"
PRINTING=$output
elif [ "${#printing[@]}" -eq "1" ]; then
PRINTING=${printing[0]}
fi
. ./etc/printing/$PRINTING
packages
reset packages
cp ./etc/printing/$PRINTING $tmp_target
fi
fi
if [ "$output" == "yes" ]; then
addpkg cups
fi