mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-02-01 21:31:52 +00:00
Update build.func
This commit is contained in:
parent
85f542038d
commit
5973a8c4b1
@ -186,11 +186,10 @@ update_motd_ip() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
header_info() {
|
header_info() {
|
||||||
# Check if figlet is installed
|
# Check if figlet is installed
|
||||||
if ! command -v figlet &> /dev/null; then
|
if ! command -v figlet &> /dev/null; then
|
||||||
msg_info "${INFO}${BOLD}${DGN}Figlet for ASCII-Header not found. Installing..."
|
echo -e "${INFO}${BOLD}${DGN}Figlet for ASCII-Header not found. Installing..."
|
||||||
|
|
||||||
# Install necessary dependencies and figlet
|
# Install necessary dependencies and figlet
|
||||||
if [ -f /etc/debian_version ] || [ -f /etc/lsb-release ]; then
|
if [ -f /etc/debian_version ] || [ -f /etc/lsb-release ]; then
|
||||||
@ -225,7 +224,7 @@ header_info() {
|
|||||||
cp -r /tmp/figlet/fonts/*.flf /usr/local/share/figlet/
|
cp -r /tmp/figlet/fonts/*.flf /usr/local/share/figlet/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_ok "${CM}${BOLD}${DGN}Figlet successfully installed"
|
echo -e "${CM}${BOLD}${DGN}Figlet successfully installed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf "$temp_dir"
|
rm -rf "$temp_dir"
|
||||||
@ -234,9 +233,7 @@ header_info() {
|
|||||||
term_width=$(tput cols 2>/dev/null || echo 120)
|
term_width=$(tput cols 2>/dev/null || echo 120)
|
||||||
ascii_art=$(figlet -f slant -w "$term_width" "$APP")
|
ascii_art=$(figlet -f slant -w "$term_width" "$APP")
|
||||||
clear
|
clear
|
||||||
cat <<EOF
|
echo "$ascii_art"
|
||||||
$ascii_art
|
|
||||||
EOF
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function checks if the script is running through SSH and prompts the user to confirm if they want to proceed or exit.
|
# This function checks if the script is running through SSH and prompts the user to confirm if they want to proceed or exit.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user