Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Checking dependencies BASH

#!/bin/bash
echo -n "Checking dependencies... "
for name in youtube-dl yad ffmpeg
do
  [[ $(which $name 2>/dev/null) ]] || { echo -en "
$name needs to be installed. Use 'sudo apt-get install $name'";deps=1; }
done
[[ $deps -ne 1 ]] && echo "OK" || { echo -en "
Install the above and rerun this script
";exit 1; }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Checking #dependencies #BASH
ADD COMMENT
Topic
Name
5+8 =