From: Bastian Dehn Date: Sun, 26 Nov 2017 09:34:47 +0000 (+0100) Subject: change: check install programm optimize X-Git-Tag: v1.0.0^2~84 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=42f5fa093d27a0882377bd7eaac0bfa2591292d1;p=albentohandy.git change: check install programm optimize --- 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