Exemple #1
0
def run():

    if run_process(['brew install netdata']) == 0:
       
        if run_process(['brew services start netdata']) == 0:
            print(bcolors.OKGREEN + "You can access Netdata at http://localhost:19999" + bcolors.OKGREEN)
            return 0
        else :
            return 1
    else: 
        return 1
Exemple #2
0
def run():
    #sudo DEBIAN_FRONTEND=noninteractive apt-get install -y /home/stan/fahclient_7.4.4_amd64.deb
    name = str(input("\nWhat would you like your name to be ? Default Anonymous " ) or "Anonymous")
    team = int(input("\nWhat team would you like to join (int) ? Default 263124 ") or "263124")
    gpu = "false"
    if str(input("Would you like to use your gpu ? Default No (y/n)" ) or "No").lower().startswith("y"):
        gpu = "true"
    if run_process("sudo mkdir -p ~/folding") == 0:
        if run_process("sudo wget -N https://download.foldingathome.org/releases/public/release/fahclient/debian-testing-64bit/v7.4/fahclient_7.4.4-64bit-release.tar.bz2 -P ~/folding/") == 0:
            if run_process("sudo chown $USER:$USER ~/folding/") == 0:
                if run_process("tar jxf ~/folding/fahclient_7.4.4-64bit-release.tar.bz2 --strip-components=1 -C ~/folding/ ") == 0:
                    with open(os.path.expanduser("~/folding/config.xml"), 'w') as configFile:
                        configFile.write(generateConfig(name, team, gpu))
                        return 0
                            
    return 1
Exemple #3
0
def run_brew(name, command):
    if str(
            input("\nWould you like to install " + name +
                  " ? Default yes (y/n) ") or "y").lower().startswith('y'):
        print(bcolors.OKBLUE + "Installing " + name + bcolors.ENDC)
        exit_code = run_process(["brew " + command])
        if exit_code != 0:
            print(bcolors.FAIL + "Error in the installation of " + name +
                  ", exit code: " + exit_code + bcolors.ENDC)
            quit()
        else:
            print(bcolors.OKGREEN + "Installation Successfull" + bcolors.ENDC)
    else:
        print("Ok, not installing " + name)
Exemple #4
0
def run():
    print(bcolors.HEADER + " Checking" + bcolors.ENDC)
    exit_code = run_process_no_log(['which brew'])

    if exit_code != 0:
        input_user = str(
            input(bcolors.OKBLUE + "\nWould you like to install brew ?" +
                  bcolors.ENDC + " Default yes (y/n) ") or "y")
        if input_user.lower().startswith('y'):
            print(bcolors.OKBLUE + "Installing Homebrew" + bcolors.ENDC)
            exit_code = hbrun()
            if not exit_code:
                print(bcolors.FAIL + "Error in the installation of Homebrew" +
                      bcolors.ENDC)
                return 1
    else:
        print(bcolors.OKGREEN + "Updating Brew" + bcolors.ENDC)
        exit_code = run_process(["brew update"])
        if exit_code != 0:
            return 1
    run_brew("git", "install git")
    run_brew("Google Chrome", "cask install google-chrome")
    run_brew("Google Chrome Canary", "cask install google-chrome-canary")
    run_brew("Firefox", "cask install firefox")
    run_brew("Firefox Developer Edition",
             "cask install firefox-developer-edition")
    run_brew("Visual Studio Code", "cask install visual-studio-code")
    run_brew("Visual Studio Code Insiders",
             "cask install visual-studio-code-insiders")
    run_brew("Intellij", "cask install intellij-idea")
    run_brew("Eclipse Java", "cask install eclipse-java")
    run_brew("Postman", "cask install postman")
    run_brew("Docker", "cask install docker")
    run_brew("Spectacle", "cask install spectacle")
    run_brew("Tree", " install tree")


# brew install git
# brew cask install google-chrome
# brew cask install google-chrome-canary
# brew cask install firefox
# brew cask install firefox-developer-edition
# brew cask install visual-studio-code
# brew cask install visual-studio-code-insiders
# brew cask install intellij-idea
# brew cask install eclipse-java
# brew cask install postman
# brew cask install docker
# brew cask install spectacle
# brew install tree
Exemple #5
0
def run():
    if run_process(['sh -c "$(curl -Ss https://my-netdata.io/kickstart.sh)"'
                    ]) == 0:
        return 0
    else:
        return 1
Exemple #6
0
def run():
    return run_process(['xcode-select --install'])
Exemple #7
0
def run():
    return run_process([
        'sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"'
    ])