Skip to content

Install Scripts

JohnVictoryz edited this page Dec 1, 2022 · 6 revisions

Now In this part you will understand how they work (or don't for your case 😄 )

Debian Install Script

#!/bin/bash
git clone https://www.github.com/JohnVictoryz/SimplePythonBrowser
cd SimplePythonBrowser
cat LICENSE
echo "\nDo you agree with the lisense (y/n)"
read x
if [ ${x} = "y" ] 
then
    echo "\nDo you want to update the system on installation(recommented) (y/n)"
    read d
    if [ ${d} = "y" ]
    then
        sudo apt update
    else
        echo "\nWe won't update the system"
    fi
    sudo apt install python, python3, python-pip, python3-pip
    pip install PyQt5, PyQtWebEngine, sip, requests
    echo "\nSimple Python Browser instaled all the dependeses successfully for updates check the github for info on updating"
else
    echo "\nInstallation exited with error code (205) that means the user did not accept the lisence"
fi

Lines 1 to 6

1.Firstly we choose to use the bash to execute our code
2.Then we clone the repository
3.We go to the directory of the repository
4.We display the license
5.Then we print if you want to accept it
6.And we take the input

The If statement into 2 Parts

Part 1

1.We Check the condition
2.We display if they want to update the system
3.We take the input
4.Check the condition
4.1 If choose to upgrade
Update using apt
4.2 If choose to not upgrade
Display Not going to upgrade
5.Installing using apt python, python3 , python-pip(aka: pip), python3-pip
6.Using pip to install needed libraries
7.Display that we are done

Part 2

  1. Display that the user didn't agree so the install was aborted\
  2. Close the if statement

Red Hat (RPM) Install Script

#!/bin/bash
git clone https://www.github.com/JohnVictoryz/SimplePythonBrowser
cd SimplePythonBrowser
cat LICENSE
echo "\nDo you agree with the lisense(y/n):"
read x
if [ ${x} = "y" ] 
then
    sudo dnf install python3 python-pip 
    pip3 install PyQt5 PyQtWebEngine sip requests
    echo "\nYou Have sucessfully installed SimplePythonBrowser!"
else 
    echo "\nThe Installation failed because the user did not agreed with the license!"
fi

Lines 1 to 6

1.Firstly we choose to use the bash to execute our code
2.Then we clone the repository
3.We go to the directory of the repository
4.We display the license
5.Then we print if you want to accept it
6.And we take the input

The If statement into 2 Parts

Part 1

1.We Check the condition
2.Installing using dnf python, python3 , python-pip(aka: pip), python3-pip
3.Using pip to install needed libraries
4.Display that we are done

Part 2

  1. Display that the user didn't agree so the install was aborted\
  2. Close the if statement

Arch Install Script

#!/bin/bash
git clone https://github.com/The-All-Python-Project/SimplePythonBrowser
cd SimplePythonBrowser
cat LICENSE
echo "\nDo You Agree with the LICENSE (y/n)"
read x
if [ ${x} = "y" ]
then 
    echo "\n Do you want to update the system(recommented) (y/n)"
    read d
    if [ ${d} = "y" ]
    then
        sudo pacman -S
    else
        echo "\nWe won't update the system"
    fi
    sudo pacman -Syu git python3 python-pip
    pip3 install PyQt5 sip requests PyQtWebEngine
    echo "\nYou Have sucessfully installed SimplePythonBrowser!"
else
    echo "\nIf you don't agree to a license, you won't be able to install it."
    echo "\nThe Installation failed because the user did not agreed with the license!"
fi

Lines 1 to 6

1.Firstly we choose to use the bash to execute our code
2.Then we clone the repository
3.We go to the directory of the repository
4.We display the license
5.Then we print if you want to accept it
6.And we take the input

The If statement into 2 Parts

Part 1

1.We Check the condition
2.We display if they want to update the system
3.We take the input
4.Check the condition
4.1 If choose to upgrade
Update using pacman
4.2 If choose to not upgrade
Display Not going to upgrade
5.Installing using pacman python, python3 , python-pip(aka: pip), python3-pip
6.Using pip to install needed libraries
7.Display that we are done

Part 2

  1. Display that the user didn't agree so the install was aborted\
  2. Close the if statement

Auto Run Script

#!/bin/bash
# If you want it to cd in the directory for easy acess to the program uncomment the next line below
# cd YOURFILEPATHTOTHEDIRECTORIYOUINSTALLED
python3 Simple_browser.py

1.Using bash
2.Uncomment 3rd line for the bash to change the directory to where you installed it
3.Just runing file using python

Clone this wiki locally