Add configure file
This commit is contained in:
parent
2ccc171077
commit
c446f0052a
38
configure
vendored
Normal file → Executable file
38
configure
vendored
Normal file → Executable file
@ -1,2 +1,36 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
sudo apt update && sudo apt install libmagic-dev
|
|
||||||
|
# Function to install libmagic-dev on Debian-based distros
|
||||||
|
install_debian() {
|
||||||
|
echo "Detected Debian-based distro. Installing libmagic-dev..."
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libmagic-dev
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to install file-devel on Red Hat-based distros
|
||||||
|
install_redhat() {
|
||||||
|
echo "Detected Red Hat-based distro. Installing file-devel..."
|
||||||
|
sudo yum install -y file-devel
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to install libmagic on Arch-based distros
|
||||||
|
install_arch() {
|
||||||
|
echo "Detected Arch-based distro. Installing libmagic..."
|
||||||
|
sudo pacman -Syu --noconfirm
|
||||||
|
sudo pacman -S --noconfirm libmagic
|
||||||
|
}
|
||||||
|
|
||||||
|
# Detect Linux distro and install appropriate package
|
||||||
|
if [ -f /etc/debian_version ]; then
|
||||||
|
install_debian
|
||||||
|
elif [ -f /etc/redhat-release ]; then
|
||||||
|
install_redhat
|
||||||
|
elif [ -f /etc/arch-release ]; then
|
||||||
|
install_arch
|
||||||
|
else
|
||||||
|
echo "Unsupported Linux distribution. Please install libmagic manually."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Installation complete!"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user