0.5*--
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Function
|
||||
|
||||
function get_dep(){
|
||||
pacman -Sqy --noconfirm $@ &> /dev/null
|
||||
if [[ $? -ne 0 ]]; then
|
||||
if [[ $@ == "p7zip" ]]; then failed_install 7z; else failed_install $@; fi
|
||||
else
|
||||
if [[ $@ == "p7zip" ]]; then complete_install 7z; else complete_install $@; fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Run
|
||||
echo -e "Pacman system detected"
|
||||
echo "---------------------"
|
||||
|
||||
apt-get update 1> /dev/null
|
||||
|
||||
if [ $# -eq 1 ]; then
|
||||
if $PRIVSOFT; then
|
||||
rarInstall
|
||||
fi
|
||||
for installer in "tar" "bzip2" "gzip" "zip" "unzip" "p7zip"
|
||||
do get_dep $installer
|
||||
done
|
||||
else
|
||||
for i in $@
|
||||
do
|
||||
if [ $i -ne "-i" ]
|
||||
then
|
||||
case $i in
|
||||
"rar" | "unrar")
|
||||
rarInstall
|
||||
;;
|
||||
"7z" | "7zip" | "p7zip")
|
||||
get_dep p7zip
|
||||
;;
|
||||
*)
|
||||
get_dep $i
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
fi
|
||||
@@ -0,0 +1,46 @@
|
||||
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Function
|
||||
|
||||
function get_dep(){
|
||||
zypper install -y $@ &> /dev/null
|
||||
if [[ $? -ne 0 ]]; then
|
||||
if [[ $@ == "p7zip-full" ]]; then failed_install 7z; else failed_install $@; fi
|
||||
else
|
||||
if [[ $@ == "p7zip-full" ]]; then complete_install 7z; else complete_install $@; fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Run
|
||||
echo -e "Zypper system detected"
|
||||
echo "---------------------"
|
||||
|
||||
apt-get update 1> /dev/null
|
||||
|
||||
if [ $# -eq 1 ]; then
|
||||
if $PRIVSOFT; then
|
||||
rarInstall
|
||||
fi
|
||||
for installer in "tar" "bzip2" "gzip" "zip" "unzip" "p7zip-full"
|
||||
do get_dep $installer
|
||||
done
|
||||
else
|
||||
for i in $@
|
||||
do
|
||||
if [ $i -ne "-i" ]
|
||||
then
|
||||
case $i in
|
||||
"rar" | "unrar")
|
||||
rarInstall
|
||||
;;
|
||||
"7z" | "7zip" | "p7zip")
|
||||
get_dep p7zip-full
|
||||
;;
|
||||
*)
|
||||
get_dep $i
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
fi
|
||||
Reference in New Issue
Block a user