From 42f5fa093d27a0882377bd7eaac0bfa2591292d1 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sun, 26 Nov 2017 10:34:47 +0100 Subject: [PATCH] change: check install programm optimize --- albentohandy | 36 +++++++----------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) diff --git a/albentohandy b/albentohandy index bd6743d..ed79975 100755 --- a/albentohandy +++ b/albentohandy @@ -134,36 +134,14 @@ LoadConfig() { ExistsBasicProgramms() { local exists=true + local programms=("eyeD3" "flac" "lame" "sha256sum" "7z" "parallel") - if [ ! -f /usr/bin/eyeD3 ]; then - printf "eyeD3 not installed\n" - exists=false - fi - - if [ ! -f /usr/bin/flac ]; then - printf "flac not installed\n" - exists=false - fi - - if [ ! -f /usr/bin/lame ]; then - printf "lame not installed\n" - exists=false - fi - - if [ ! -f /usr/bin/sha256sum ]; then - printf "sha256sum not installed" - exists=false - fi - - if [ ! -f /usr/bin/7z ]; then - printf "7-zip not installed" - exists=false - fi - - if [ ! -f /usr/bin/parallel ]; then - printf "parallel not installed" - exists=false - fi + for programm in $programms; do + if [ ! -f /usr/bin/$programm ]; then + printf "$programm not installed\n" + exists=false + fi + done if [ $exists == false ]; then exit 1 -- 2.47.3