added rar installation
This commit is contained in:
@@ -131,6 +131,26 @@ function check()
|
||||
exit 0
|
||||
}
|
||||
|
||||
function rarInstall()
|
||||
if [ $(uname -m) -eq "x86_64" ]; then
|
||||
wget https://www.rarlab.com/rar/rarlinux-x64-5.9.1.tar.gz
|
||||
tar -zxvf rarlinux-x64-5.9.1.tar.gz
|
||||
cd rar
|
||||
sudo cp -v rar unrar /usr/local/bin/
|
||||
cd ..
|
||||
rm -r rar rarlinux-x64-5.9.1.tar.gz
|
||||
echo "rar/unrar installed."
|
||||
else
|
||||
wget https://www.rarlab.com/rar/rarlinux-5.9.1.tar.gz
|
||||
tar -zxvf rarlinux-x64-5.9.1.tar.gz
|
||||
cd rar
|
||||
sudo cp -v rar unrar /usr/local/bin/
|
||||
cd ..
|
||||
rm -r rar rarlinux-5.9.1.tar.gz
|
||||
echo "rar/unrar installed."
|
||||
fi
|
||||
}
|
||||
|
||||
function install()
|
||||
{
|
||||
echo -e "Install dependencies\n"
|
||||
@@ -141,10 +161,17 @@ function install()
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -e "$(command -v rar)" ]
|
||||
then
|
||||
echo "rar installed."
|
||||
else
|
||||
rarInstall
|
||||
fi
|
||||
|
||||
if [ -x "$(command -v apt)" ]
|
||||
then
|
||||
echo -e "APT system detected\n"
|
||||
apt install -y tar bzip2 gzip zip p7zip-full rar unrar-free 1> /dev/null
|
||||
apt install -y tar bzip2 gzip zip p7zip-full 1> /dev/null
|
||||
elif [ -n "$(grep "centos" /etc/*-release)" ]
|
||||
then
|
||||
echo -e "CentOS system detected\n"
|
||||
@@ -152,7 +179,7 @@ function install()
|
||||
rpm -U --quiet http://mirrors.kernel.org/fedora-epel/6/i386/epel-release-6-8.noarch.rpm 1> /dev/null
|
||||
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 1> /dev/null
|
||||
yum repolist 1> /dev/null
|
||||
yum install -y -q tar bzip2 gzip zip p7zip unar 1> /dev/null
|
||||
yum install -y -q tar bzip2 gzip zip p7zip 1> /dev/null
|
||||
elif [ -x "$(command -v dnf)" ]
|
||||
then
|
||||
echo -e "DNF system detected\n"
|
||||
|
||||
Reference in New Issue
Block a user