mirror of
https://github.com/RasppleII/a2server.git
synced 2025-08-15 17:27:21 +00:00
a2server-2-tools: Use Debian's unar if available
This commit is contained in:
@@ -65,7 +65,7 @@ fi
|
|||||||
# download and install The Unarchiver, for expanding Apple disk images
|
# download and install The Unarchiver, for expanding Apple disk images
|
||||||
# http://wakaba.c3.cx/s/apps/unarchiver.html
|
# http://wakaba.c3.cx/s/apps/unarchiver.html
|
||||||
|
|
||||||
if [[ ! -f /usr/local/bin/unar ]]; then
|
if ! command -v unar >/dev/null; then
|
||||||
|
|
||||||
echo "A2SERVER: Installing The Unarchiver..."
|
echo "A2SERVER: Installing The Unarchiver..."
|
||||||
|
|
||||||
@@ -75,6 +75,11 @@ if [[ ! -f /usr/local/bin/unar ]]; then
|
|||||||
touch /tmp/a2server-packageReposUpdated
|
touch /tmp/a2server-packageReposUpdated
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if apt-cache show unar &>/dev/null; then
|
||||||
|
# Debian package exists >= jessie.
|
||||||
|
sudo apt-get -y install unar
|
||||||
|
else
|
||||||
|
# Legacy binary tarballs for wheezy.
|
||||||
if [[ $isRpi || $isDebian ]]; then
|
if [[ $isRpi || $isDebian ]]; then
|
||||||
sudo apt-get -y install libgnustep-base1.22
|
sudo apt-get -y install libgnustep-base1.22
|
||||||
sudo apt-get clean
|
sudo apt-get clean
|
||||||
@@ -84,7 +89,9 @@ if [[ ! -f /usr/local/bin/unar ]]; then
|
|||||||
wget -qO- "http://appleii.ivanx.com/a2server/files/unar-debian7_x86.tgz" | sudo tar Pzx
|
wget -qO- "http://appleii.ivanx.com/a2server/files/unar-debian7_x86.tgz" | sudo tar Pzx
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ ! -f /usr/local/bin/unar ]]; then
|
|
||||||
|
# If all else fails, compile from source.
|
||||||
|
if ! command -v unar >/dev/null; then
|
||||||
sudo apt-get -y install build-essential
|
sudo apt-get -y install build-essential
|
||||||
sudo apt-get -y install libgnustep-base-dev libz-dev libbz2-dev
|
sudo apt-get -y install libgnustep-base-dev libz-dev libbz2-dev
|
||||||
sudo apt-get -y install libssl-dev libicu-dev unzip
|
sudo apt-get -y install libssl-dev libicu-dev unzip
|
||||||
@@ -103,6 +110,7 @@ if [[ ! -f /usr/local/bin/unar ]]; then
|
|||||||
rm -rf /tmp/unar
|
rm -rf /tmp/unar
|
||||||
fi
|
fi
|
||||||
sudo mandb &> /dev/null
|
sudo mandb &> /dev/null
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "A2SERVER: The Unarchiver has already been installed."
|
echo "A2SERVER: The Unarchiver has already been installed."
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user