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