-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add installation of CUPS as a pre-requisite for Epson printer drivers…
… as well as standalone script for other printer drivers to be added in the future.
- Loading branch information
Showing
4 changed files
with
50 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh -e | ||
|
||
. ../../common-script.sh | ||
|
||
# Function to install CUPS for printers | ||
installCUPS() { | ||
clear | ||
|
||
case "$PACKAGER" in | ||
pacman) | ||
"$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm cups | ||
;; | ||
apt-get | nala) | ||
"$ESCALATION_TOOL" "$PACKAGER" install -y cups | ||
;; | ||
dnf) | ||
"$ESCALATION_TOOL" "$PACKAGER" install -y cups | ||
;; | ||
*) | ||
printf "%b\n" "${RED}Unsupported package manager ${PACKAGER}${RC}" | ||
exit 1 | ||
;; | ||
esac | ||
} | ||
|
||
checkEnv | ||
checkEscalationTool | ||
installCUPS |
28 changes: 15 additions & 13 deletions
28
core/tabs/utils/printers/install-epson-printer-drivers.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
#!/bin/sh -e | ||
|
||
. ../../common-script.sh | ||
. ./install-cups.sh | ||
|
||
# Function to install drivers for Epson printers | ||
installEpsonPrinterDriver() { | ||
clear | ||
|
||
case "$PACKAGER" in | ||
pacman) | ||
"$AUR_HELPER" -S --noconfirm epson-inkjet-printer-escpr | ||
;; | ||
apt-get|nala) | ||
"$ESCALATION_TOOL" "$PACKAGER" install -y printer-driver-escpr | ||
;; | ||
dnf) | ||
"$ESCALATION_TOOL" "$PACKAGER" install -y epson-inkjet-printer-escpr | ||
;; | ||
*) | ||
printf "%b\n" "${RED}Unsupported package manager ${PACKAGER}${RC}" | ||
exit 1 | ||
;; | ||
pacman) | ||
"$AUR_HELPER" -S --noconfirm epson-inkjet-printer-escpr | ||
;; | ||
apt-get | nala) | ||
"$ESCALATION_TOOL" "$PACKAGER" install -y printer-driver-escpr | ||
;; | ||
dnf) | ||
"$ESCALATION_TOOL" "$PACKAGER" install -y epson-inkjet-printer-escpr | ||
;; | ||
*) | ||
printf "%b\n" "${RED}Unsupported package manager ${PACKAGER}${RC}" | ||
exit 1 | ||
;; | ||
esac | ||
} | ||
|
||
checkEnv | ||
checkEscalationTool | ||
checkAURHelper | ||
installCUPS | ||
installEpsonPrinterDriver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters