Fix unar error introduced in 30ccb87

I'd removed debianMajor and the like in the last commit, but I missed
one instance of it being used: To install the unar package on jessie and
greater systems.  Well, jessie is now oldstable and wheezy is so
obsolete you're not even recommended to upgrade from it.  Nowadays, we
should just be installing the package.

We ought to check for it in /usr/local and see if we can determine if
its an old version and remove it, probably.  If someone else would like
to tackle that, feel free.
This commit is contained in:
T. Joseph Carter 2018-04-23 05:49:45 -07:00
parent 30ccb87cd8
commit 744210338c

View File

@ -1131,21 +1131,10 @@ if [[ $installArchiveTools ]]; then
echo "A2CLOUD: Installing The Unarchiver..."
# jessie and later: Just use the unar package
if [[ $debianMajor -ge 8 ]]; then
sudo apt-get -y install unar
sudo apt-get clean
fi
if ! hash unar 2> /dev/null; then
if [[ $downloadBinaries && "$(apt-cache search '^libgnustep-base1.22$')" ]]; then
# Dependencies: for unar
sudo apt-get -y install libgnustep-base1.22
sudo apt-get clean
wget -qO- "${a2cBinaryURL}/picopkg/unar-${ras2_os}_${ras2_arch}.tgz" | sudo tar Pzx &> /dev/null
fi
# If all else fails, compile from source.
if ! hash unar 2> /dev/null; then
# Dependencies: build-deps for unar
sudo apt-get -y install build-essential libgnustep-base-dev libz-dev libbz2-dev libssl-dev libicu-dev unzip
@ -1170,7 +1159,6 @@ if [[ $installArchiveTools ]]; then
sudo mv lsar.1 unar.1 /usr/local/man/man1
cd
rm -rf /tmp/unar
fi
sudo mandb &> /dev/null
fi
else