From e8f1e4eae9725085929d19cba4d36dda809c8a89 Mon Sep 17 00:00:00 2001 From: xengineering Date: Mon, 24 Jun 2024 19:53:57 +0200 Subject: bash: Check for required programs This commit adds code to the .bashrc file which checks for required programs on startup of bash. Thus it is easier to detect for the user if essential programs are missing. This will make it significantly easier to setup new machines. --- .bashrc | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.bashrc b/.bashrc index 0c48c49..3e1966c 100644 --- a/.bashrc +++ b/.bashrc @@ -8,7 +8,41 @@ # variables GOPATH=$HOME/go export EDITOR=nvim +PROGRAMS=' +aerc +bemenu-run +brightnessctl +dunst +foot +gammastep +grim +htop +khard +lf +mpv +nvim +pactl +rifle +slurp +swappy +swappy +sway +swaylock +vdirsyncer +' +# check for missing programs +echo "$PROGRAMS" | while read -r program +do + if [ "$program" == '' ] + then + continue + fi + if ! command -v "$program" 2>&1 > /dev/null + then + echo "Program is missing: '$program'" + fi +done # alias definitions alias ls='ls --color=auto' -- cgit v1.2.3-70-g09d2