32 lines
540 B
Plaintext
32 lines
540 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
function group {
|
||
|
echo -e "\e[1m$1\e[0m"
|
||
|
}
|
||
|
function good {
|
||
|
echo -e "[\e[92m ok \e[0m] \e[32m$1\e[0m"
|
||
|
}
|
||
|
function bad {
|
||
|
echo -e "[\e[91mfail\e[0m] \e[31m$1\e[0m"
|
||
|
}
|
||
|
|
||
|
function check {
|
||
|
local NAME
|
||
|
test -z "$2" || NAME="$2"
|
||
|
test -z "$NAME" && NAME="$1"
|
||
|
if [ -z "$(which $1)" ]; then
|
||
|
bad "$NAME is missing"
|
||
|
else
|
||
|
good "Found $NAME at $(which $1)"
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
group "Checking for zenity"
|
||
|
check "zenity"
|
||
|
check "dialog"
|
||
|
|
||
|
group "Checking tools"
|
||
|
check "ffprobe"
|
||
|
check "ffmpeg"
|
||
|
check "transcode"
|