From ca16f238bb02c6839ddb60f8dcd08fa00c7266ad Mon Sep 17 00:00:00 2001 From: Solomon Laing Date: Tue, 19 Jul 2022 15:16:39 +0930 Subject: [PATCH] made some thing executables oops --- scripts/cron/checkup | 0 scripts/cron/crontog | 0 scripts/ifinstalled | 12 ++++++++++++ 3 files changed, 12 insertions(+) mode change 100644 => 100755 scripts/cron/checkup mode change 100644 => 100755 scripts/cron/crontog create mode 100755 scripts/ifinstalled diff --git a/scripts/cron/checkup b/scripts/cron/checkup old mode 100644 new mode 100755 diff --git a/scripts/cron/crontog b/scripts/cron/crontog old mode 100644 new mode 100755 diff --git a/scripts/ifinstalled b/scripts/ifinstalled new file mode 100755 index 0000000..c192eba --- /dev/null +++ b/scripts/ifinstalled @@ -0,0 +1,12 @@ +#!/bin/sh + +# Some optional functions in LARBS require programs not installed by default. I +# use this little script to check to see if a command exists and if it doesn't +# it informs the user that they need that command to continue. This is used in +# various other scripts for clarity's sake. + +for x in "$@"; do + if ! which "$x" >/dev/null 2>&1 && ! pacman -Qq "$x" >/dev/null 2>&1; then + notify-send "📦 $x" "must be installed for this function." && exit 1 ; + fi +done