From cb4a924dd18a7ae70a5cf338273e11a77ca011f0 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Sat, 28 Dec 2024 19:17:41 +0100 Subject: [PATCH] Update build.func --- misc/build.func | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/misc/build.func b/misc/build.func index 023908c5..10b7216d 100644 --- a/misc/build.func +++ b/misc/build.func @@ -160,12 +160,11 @@ header_info() { if ! command -v figlet &> /dev/null; then if [ -f /etc/debian_version ] || [ -f /etc/lsb-release ]; then apt-get update -y &> /dev/null - apt-get install -y tar &> /dev/null # Sicherstellen, dass tar vorhanden ist + apt-get install -y tar build-essential &> /dev/null # Ensure tar and build tools are installed elif [ -f /etc/alpine-release ]; then - apk add --no-cache tar &> /dev/null # Sicherstellen, dass tar vorhanden ist + apk add --no-cache tar build-base &> /dev/null # Ensure tar and build tools are installed export TERM=xterm else - echo "Unsupported OS" return 1 fi @@ -173,18 +172,20 @@ header_info() { curl -sL https://github.com/community-scripts/ProxmoxVE/raw/refs/heads/develop/misc/figlet.tar.xz -o "$temp_dir/figlet.tar.xz" tar -xf "$temp_dir/figlet.tar.xz" -C "$temp_dir" - # Überprüfen, ob die Datei bereits existiert - if [ -e /usr/local/bin/figlet ]; then - echo "Figlet ist bereits installiert, Überschreibung wird übersprungen." - else + cd "$temp_dir" || exit 1 + make &> /dev/null + if [ $? -eq 0 ]; then mv "$temp_dir/figlet" /usr/local/bin/ chmod +x /usr/local/bin/figlet + else + rm -rf "$temp_dir" + return 1 fi - + rm -rf "$temp_dir" fi - term_width=$(tput cols 2>/dev/null || echo 120) # Default to 120 columns + term_width=$(tput cols 2>/dev/null || echo 120) ascii_art=$(figlet -f slant -w "$term_width" "$APP") clear cat <