mirror of
https://github.com/RasppleII/a2server.git
synced 2025-01-11 11:31:21 +00:00
a2server-2-tools: Use Debian's unar if available
This commit is contained in:
parent
7cf972cc7d
commit
bd3cf7ac72
@ -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,34 +75,42 @@ if [[ ! -f /usr/local/bin/unar ]]; then
|
|||||||
touch /tmp/a2server-packageReposUpdated
|
touch /tmp/a2server-packageReposUpdated
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $isRpi || $isDebian ]]; then
|
if apt-cache show unar &>/dev/null; then
|
||||||
sudo apt-get -y install libgnustep-base1.22
|
# Debian package exists >= jessie.
|
||||||
sudo apt-get clean
|
sudo apt-get -y install unar
|
||||||
if [[ $isRpi ]]; then
|
else
|
||||||
wget -qO- "http://appleii.ivanx.com/a2server/files/unar-rpi.tgz" | sudo tar Pzx
|
# Legacy binary tarballs for wheezy.
|
||||||
elif [[ $isDebian ]]; then
|
if [[ $isRpi || $isDebian ]]; then
|
||||||
wget -qO- "http://appleii.ivanx.com/a2server/files/unar-debian7_x86.tgz" | sudo tar Pzx
|
sudo apt-get -y install libgnustep-base1.22
|
||||||
|
sudo apt-get clean
|
||||||
|
if [[ $isRpi ]]; then
|
||||||
|
wget -qO- "http://appleii.ivanx.com/a2server/files/unar-rpi.tgz" | sudo tar Pzx
|
||||||
|
elif [[ $isDebian ]]; then
|
||||||
|
wget -qO- "http://appleii.ivanx.com/a2server/files/unar-debian7_x86.tgz" | sudo tar Pzx
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# 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 libgnustep-base-dev libz-dev libbz2-dev
|
||||||
|
sudo apt-get -y install libssl-dev libicu-dev unzip
|
||||||
|
sudo apt-get clean
|
||||||
|
rm -rf /tmp/unar &> /dev/null
|
||||||
|
mkdir /tmp/unar
|
||||||
|
cd /tmp/unar
|
||||||
|
wget -qO unar1.7_src.zip http://theunarchiver.googlecode.com/files/unar1.7_src.zip
|
||||||
|
unzip -o unar1.7_src.zip
|
||||||
|
cd The\ Unarchiver/XADMaster
|
||||||
|
make -f Makefile.linux
|
||||||
|
sudo mv lsar unar /usr/local/bin
|
||||||
|
cd ../Extra
|
||||||
|
sudo mv lsar.1 unar.1 /usr/local/man/man1
|
||||||
|
cd
|
||||||
|
rm -rf /tmp/unar
|
||||||
|
fi
|
||||||
|
sudo mandb &> /dev/null
|
||||||
fi
|
fi
|
||||||
if [[ ! -f /usr/local/bin/unar ]]; then
|
|
||||||
sudo apt-get -y install build-essential
|
|
||||||
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 clean
|
|
||||||
rm -rf /tmp/unar &> /dev/null
|
|
||||||
mkdir /tmp/unar
|
|
||||||
cd /tmp/unar
|
|
||||||
wget -qO unar1.7_src.zip http://theunarchiver.googlecode.com/files/unar1.7_src.zip
|
|
||||||
unzip -o unar1.7_src.zip
|
|
||||||
cd The\ Unarchiver/XADMaster
|
|
||||||
make -f Makefile.linux
|
|
||||||
sudo mv lsar unar /usr/local/bin
|
|
||||||
cd ../Extra
|
|
||||||
sudo mv lsar.1 unar.1 /usr/local/man/man1
|
|
||||||
cd
|
|
||||||
rm -rf /tmp/unar
|
|
||||||
fi
|
|
||||||
sudo mandb &> /dev/null
|
|
||||||
else
|
else
|
||||||
echo "A2SERVER: The Unarchiver has already been installed."
|
echo "A2SERVER: The Unarchiver has already been installed."
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user