workplace/lib/toolcheck
2024-05-31 23:01:16 +02:00

24 lines
490 B
Bash

#!/bin/bash
#
# Make sure all required tools are installed.
#
workplace_toolcheck(){
## BINARIES IN PATH ##
bin_tool_list=("grep xeventbind")
for b in $bin_tool_list; do
if [[ ! -f $(which "$b") ]]; then
log_error "Missing tool '$b'"
fi
done
## DPKG PACKAGES ##
dpkg_tool_list=("sed findutils procps usbutils libglib2.0-bin")
for d in $dpkg_tool_list; do
if ! dpkg -s $d 2>&1 | grep -q "Status: install ok installed"; then
log_error "Missing tool '$d'"
fi
done
}