summaryrefslogtreecommitdiff
path: root/posix-shell/programs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'posix-shell/programs.sh')
-rw-r--r--posix-shell/programs.sh25
1 files changed, 13 insertions, 12 deletions
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
+}