mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-11 02:09:17 +00:00
Update build.func
This commit is contained in:
parent
4374a25909
commit
dc8b65bfd8
@ -160,33 +160,35 @@ 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 build-essential &> /dev/null # Ensure tar and build tools are installed
|
apt-get install -y tar &> /dev/null # Sicherstellen, dass tar vorhanden ist
|
||||||
elif [ -f /etc/alpine-release ]; then
|
elif [ -f /etc/alpine-release ]; then
|
||||||
apk add --no-cache tar build-base &> /dev/null # Ensure tar and build tools are installed
|
apk add --no-cache tar &> /dev/null # Sicherstellen, dass tar vorhanden ist
|
||||||
export TERM=xterm
|
export TERM=xterm
|
||||||
else
|
else
|
||||||
|
echo "Unsupported OS"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
temp_dir=$(mktemp -d)
|
temp_dir=$(mktemp -d)
|
||||||
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" # Tar entpacken in temp_dir
|
||||||
|
|
||||||
cd "$temp_dir" || exit 1
|
# Erstellen eines neuen Verzeichnisses ohne den Tar-Ordner
|
||||||
make # Remove the redirection to see errors
|
mkdir -p /tmp/figlet
|
||||||
|
mv "$temp_dir/figlet" /tmp/figlet/ # Verschiebe die figlet-Binärdatei
|
||||||
|
chmod +x /tmp/figlet/figlet # Setze die Ausführungsrechte für figlet
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
# Überprüfen, ob figlet bereits installiert ist
|
||||||
mv "$temp_dir/figlet" /usr/local/bin/
|
if [ -e /usr/local/bin/figlet ]; then
|
||||||
chmod +x /usr/local/bin/figlet
|
echo "Figlet is already installed, skipping overwrite."
|
||||||
else
|
else
|
||||||
rm -rf "$temp_dir"
|
mv /tmp/figlet/figlet /usr/local/bin/ # Verschiebe figlet nach /usr/local/bin/
|
||||||
return 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf "$temp_dir"
|
rm -rf "$temp_dir" # Entferne das temporäre Verzeichnis
|
||||||
fi
|
fi
|
||||||
|
|
||||||
term_width=$(tput cols 2>/dev/null || echo 120)
|
term_width=$(tput cols 2>/dev/null || echo 120) # Default to 120 columns
|
||||||
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