aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarvasva (Savvy) Raghuvanshi2017-08-13 18:33:03 -0500
committerSarvasva (Savvy) Raghuvanshi2017-08-13 18:33:03 -0500
commit25adab64feb24a168dae6bf23d99aeb9083eea1b (patch)
tree310c31d5aa24d5dccf60dd122d2d6ad594b620a5
parentf9e63c07822c194720c5a47136888da6a728b726 (diff)
downloadaur-25adab64feb24a168dae6bf23d99aeb9083eea1b.tar.gz
updated dependencies -- hopefully it'll work this time?
-rwxr-xr-xharvard-linux-printer.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/harvard-linux-printer.sh b/harvard-linux-printer.sh
index 693d03cff25a..b24bb021eaea 100755
--- a/harvard-linux-printer.sh
+++ b/harvard-linux-printer.sh
@@ -1,12 +1,17 @@
#!/bin/bash
-sudo echo "Installing dependencies..."
+# sudo echo "Installing dependencies..."
# the following lines are for Ubuntu only
# sudo apt-get update > /dev/null
# sudo apt-get install cups-client cups-server-common smbclient > /dev/null
# echo "Done installing dependencies."
+# command check courtesy of https://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script
+command -v smbclient >/dev/null 2>&1 || { echo >&2 "I require smbclient but it's not installed. Aborting."; exit 1; }
+command -v lpadmin >/dev/null 2>&1 || { echo >&2 "I require lpadmin but it's not installed. Aborting."; exit 1; }
+command -v cupsd >/dev/null 2>&1 || { echo >&2 "I require cupsd but it's not installed. Aborting."; exit 1; }
+
sudo systemctl enable org.cups.cupsd.service
sudo systemctl start org.cups.cupsd.service