From fca87a8d865029b5f13114374e860ccbf31e5e7c Mon Sep 17 00:00:00 2001 From: xengineering Date: Thu, 27 Jun 2024 21:12:51 +0200 Subject: posix-shell: Do not check programs on shell init The functionality is now available as `check_programs()`. Not executing it on shell startup makes it more comfortable to use systems which do not provide all the mentioned programs. --- posix-shell/programs.sh | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'posix-shell/programs.sh') diff --git a/posix-shell/programs.sh b/posix-shell/programs.sh index 06af8e9..085d878 100644 --- a/posix-shell/programs.sh +++ b/posix-shell/programs.sh @@ -24,15 +24,16 @@ vdirsyncer ' -# check for missing programs -echo "$PROGRAMS" | while read -r program -do - if [ "$program" = '' ] - then - continue - fi - if ! command -v "$program" > /dev/null 2>&1 - then - echo "Program is missing: '$program'" - fi -done +check_programs() { + echo "$PROGRAMS" | while read -r program + do + if [ "$program" = '' ] + then + continue + fi + if ! command -v "$program" > /dev/null 2>&1 + then + echo "Program is missing: '$program'" + fi + done +} -- cgit v1.2.3-70-g09d2