0.5*--
This commit is contained in:
+2
-5
@@ -53,15 +53,12 @@ function install()
|
|||||||
elif [ -x "$(command -v dnf)" ] || [ -x "$(command -v yum)" ]
|
elif [ -x "$(command -v dnf)" ] || [ -x "$(command -v yum)" ]
|
||||||
then
|
then
|
||||||
if [[ -e ./lib/installers/rpm.sh ]]; then . ./lib/installers/rpm.sh; else . /usr/lib/lch/installers/rpm.sh; fi
|
if [[ -e ./lib/installers/rpm.sh ]]; then . ./lib/installers/rpm.sh; else . /usr/lib/lch/installers/rpm.sh; fi
|
||||||
# Hasta aqui he modificado
|
|
||||||
elif [ -x "$(command -v pacman)" ]
|
elif [ -x "$(command -v pacman)" ]
|
||||||
then
|
then
|
||||||
echo -e "Pacman system detected"
|
if [[ -e ./lib/installers/pacman.sh ]]; then . ./lib/installers/pacman.sh; else . /usr/lib/lch/installers/pacman.sh; fi
|
||||||
pacman -Sqy --noconfirm tar bzip2 gzip zip unzip p7zip 1> /dev/null
|
|
||||||
elif [ -x "$(command -v zypper)" ]
|
elif [ -x "$(command -v zypper)" ]
|
||||||
then
|
then
|
||||||
echo -e "Zypper system detected"
|
if [[ -e ./lib/installers/zypper.sh ]]; then . ./lib/installers/zypper.sh; else . /usr/lib/lch/installers/zypper.sh; fi
|
||||||
zypper install -y tar bzip2 gzip zip unzip p7zip-full 1> /dev/null
|
|
||||||
else
|
else
|
||||||
echo -e "System installer not detected"
|
echo -e "System installer not detected"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -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