sadedot/scripts/common.sh

28 lines
406 B
Bash

#!/bin/sh
displayDialogBox() {
case $dialogBox in
whiptail)
useWhiptail "$@"
;;
dialog)
useDialog "$@"
;;
?)
echo "Unknown dialogBox variable" >&2
exit 1
;;
esac
}
useDialog() {
dialog "$@" 9 60
}
useWhiptail() {
whiptail "$@" 0 0
}
setDialogBox() {
export dialogBox=${1}
}