at begining
#!/bin/bash
check permissions
if [ "$(id -u)" = "1" ]; then
echo ""
echo "You are trying to run a build as regular user."
echo
echo "Do not do this, user from SUDO group."
echo "Aborting the build. Run it as privileged user and retry."
echo
exit 1
fi
apt-get update
can be replaced by
apt update and run once at beginning
can be used
case $1 in
[1-9]|1[0-9]|2[0-9]|3[0-9]) REPLY=$1;;
echo "make action:"
echo "1) install_dvb_drivers
echo "2) install_w_scan
echo "3) install_tvheadend
echo "4) reboot_server
read -p "Select target (1-4)? ";;
esac