deSEC-DNS-GUI/desec-dns.sh

20 lines
No EOL
486 B
Bash
Executable file

#!/usr/bin/env bash
# Screen prepare
screen_size=$(stty size 2>/dev/null || echo 24 80)
rows=$(echo "$screen_size" | awk '{print $1}')
columns=$(echo "$screen_size" | awk '{print $2}')
# Divide by two so the dialogs take up half of the screen, which looks nice.
r=$(( rows / 2 ))
c=$(( columns / 2 ))
# Unless the screen is tiny
r=$(( r < 20 ? 20 : r ))
c=$(( c < 70 ? 70 : c ))
if [ -f ./functions.sh ]; then
. ./functions.sh
else
echo "functions.sh does not exists"
exit 1
fi