Private GIT

Skip to content
Snippets Groups Projects
Commit 9f593006 authored by DirtyCajunRice's avatar DirtyCajunRice Committed by miigotu
Browse files

Checked for existing packages self-install-script (#1573)

* fixed yesno and silenced git clone

* Checked for existing packages instead of trying to install regardless
parent 9e2e89b7
No related branches found
No related tags found
No related merge requests found
...@@ -29,16 +29,19 @@ intip=$(ip r g 8.8.8.8 | awk 'NR==1{print $7};') ...@@ -29,16 +29,19 @@ intip=$(ip r g 8.8.8.8 | awk 'NR==1{print $7};')
# Installed whiptail for script prerequisite # Installed whiptail for script prerequisite
apt-get -qq install whiptail -y apt-get -qq install whiptail -y
# Check to see what SickRage Dependencies are missing
packages=$(dpkg -l unrar-free git-core openssl libssl-dev python2.7 2>1 | grep "no packages" | \
awk '{ print $6 }' | tr '\n' ' ')
if [[ $packages ]]; then
# Show Whiptail and install required files # Show Whiptail and install required files
{ {
i=1 i=1
while read -r line; do while read -r line; do
i=$(( $i + 1 )) i=$(( $i + 1 ))
echo $i echo $i
done < <(apt-get update && apt-get install unrar-free git-core openssl libssl-dev python2.7 -y) done < <(apt-get update && apt-get install $packages -y)
} | whiptail --title "Progress" --gauge " } | whiptail --title "Progress" --gauge "Installing $packages" 8 80 0
Installing unrar-free, git-core, openssl, libssl-dev, and python2.7" 8 80 0 fi
# Check to see if all prior packages were installed sucessfully. if not exit 1 and display whiptail issues # Check to see if all prior packages were installed sucessfully. if not exit 1 and display whiptail issues
if [[ $(dpkg -l unrar-free git-core openssl libssl-dev python2.7 2>&1 | grep "no packages" | \ if [[ $(dpkg -l unrar-free git-core openssl libssl-dev python2.7 2>&1 | grep "no packages" | \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment