mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-14 03:39:16 +00:00
Update build.func
This commit is contained in:
parent
e52dab49f7
commit
cb4a924dd1
@ -160,12 +160,11 @@ header_info() {
|
|||||||
if ! command -v figlet &> /dev/null; then
|
if ! command -v figlet &> /dev/null; then
|
||||||
if [ -f /etc/debian_version ] || [ -f /etc/lsb-release ]; then
|
if [ -f /etc/debian_version ] || [ -f /etc/lsb-release ]; then
|
||||||
apt-get update -y &> /dev/null
|
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
|
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
|
export TERM=xterm
|
||||||
else
|
else
|
||||||
echo "Unsupported OS"
|
|
||||||
return 1
|
return 1
|
||||||
fi
|
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"
|
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"
|
tar -xf "$temp_dir/figlet.tar.xz" -C "$temp_dir"
|
||||||
|
|
||||||
# Überprüfen, ob die Datei bereits existiert
|
cd "$temp_dir" || exit 1
|
||||||
if [ -e /usr/local/bin/figlet ]; then
|
make &> /dev/null
|
||||||
echo "Figlet ist bereits installiert, Überschreibung wird übersprungen."
|
if [ $? -eq 0 ]; then
|
||||||
else
|
|
||||||
mv "$temp_dir/figlet" /usr/local/bin/
|
mv "$temp_dir/figlet" /usr/local/bin/
|
||||||
chmod +x /usr/local/bin/figlet
|
chmod +x /usr/local/bin/figlet
|
||||||
|
else
|
||||||
|
rm -rf "$temp_dir"
|
||||||
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf "$temp_dir"
|
rm -rf "$temp_dir"
|
||||||
fi
|
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")
|
ascii_art=$(figlet -f slant -w "$term_width" "$APP")
|
||||||
clear
|
clear
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user