added dependency checking
This commit is contained in:
parent
03e3520311
commit
5c03e64913
10
kunst
10
kunst
|
@ -171,7 +171,15 @@ pre_exit() {
|
|||
}
|
||||
|
||||
main() {
|
||||
|
||||
|
||||
dependencies=(sxiv imagemagick bash ffmpeg mpc jq mpd)
|
||||
for dependency in "${dependencies[@]}"; do
|
||||
type -p "$dependency" &>/dev/null || {
|
||||
echo "error: Could not find '${dependency}', is it installed?" >&2
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
|
||||
[ "$KUNST_MUSIC_DIR" != "" ] && MUSIC_DIR="$KUNST_MUSIC_DIR"
|
||||
[ "$KUNST_SIZE" != "" ] && SIZE="$KUNST_SIZE"
|
||||
[ "$KUNST_POSITION" != "" ] && POSITION="$KUNST_POSITION"
|
||||
|
|
Loading…
Reference in New Issue