diff options
| author | xengineering <me@xengineering.eu> | 2024-06-27 21:12:51 +0200 |
|---|---|---|
| committer | xengineering <me@xengineering.eu> | 2024-06-27 21:12:51 +0200 |
| commit | 8d86e9c0d05c3bb7cbff33d5cf179a402ce98225 (patch) | |
| tree | 764970207a734c4fa418059d17a40746dd0a0332 /posix-shell/programs.sh | |
| parent | 744256c36071e4cbd407dbdca20529e6350a6207 (diff) | |
| download | dotfiles-8d86e9c0d05c3bb7cbff33d5cf179a402ce98225.tar dotfiles-8d86e9c0d05c3bb7cbff33d5cf179a402ce98225.tar.zst dotfiles-8d86e9c0d05c3bb7cbff33d5cf179a402ce98225.zip | |
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.
Diffstat (limited to 'posix-shell/programs.sh')
| -rw-r--r-- | posix-shell/programs.sh | 25 |
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 +} |
