Remove WAF

This commit is contained in:
Jake Howard 2016-02-07 21:53:49 +00:00
parent 1004d53e73
commit 37cda23222
3 changed files with 12 additions and 31 deletions

View File

@ -16,13 +16,10 @@ if __name__ == '__main__':
if os.geteuid() != 0:
print("Please run as root!")
elif input("Are you sure you want to install (allthethings)? [Y/N]: ").lower() == 'y':
os.system('./install-waf.sh')
waf_scripts = []
scripts = []
for key, func in get_functions().items():
if type(func).__name__ == 'function':
waf_scripts.append(key)
if type(func).__name__ == 'function' and func.__name__[0] != '_':
scripts.append(func)
for func in waf_scripts:
cmd = "waf {}".format(func)
print("Running {}".format(cmd))
os.system("sudo " + cmd)
for func in scripts:
func()

View File

@ -1,16 +0,0 @@
#! /usr/bin/env bash
WAF_DIR=~/.home_bin
set -e
echo "Installing waf..."
mkdir -p $WAF_DIR
wget https://waf.io/waf-1.8.19
mv waf-1.8.19 $WAF_DIR/waf
chmod +x $WAF_DIR/waf
PATH=$WAF_DIR:$PATH
echo "Waf Installed Successfully!"

14
wscript
View File

@ -3,7 +3,7 @@ import json, os, shutil
DIR = os.getcwd()
def get_json(path):
def _get_json(path):
return json.load(open(DIR + path))
def update_and_upgrade(ctx):
@ -13,12 +13,12 @@ def update_and_upgrade(ctx):
def apt_install_core(ctx):
for package in get_json('/apt/apt-installs-core.json'):
for package in _get_json('/apt/apt-installs-core.json'):
os.system("apt-get install {} -y".format(package))
def add_apt_keys(ctx):
for key in get_json('/apt/apt-keys.json'):
for key in _get_json('/apt/apt-keys.json'):
os.system("wget -O - {} | apt-key add -".format(key))
@ -27,12 +27,12 @@ def add_apt_sources(ctx):
def add_apt_repos(ctx):
for repo in get_json('/apt/apt-repos.json'):
for repo in _get_json('/apt/apt-repos.json'):
os.system("add-apt-repository {} -y".format(repo))
def apt_install_extras(ctx):
for package in get_json('/apt/apt-installs-extra.json'):
for package in _get_json('/apt/apt-installs-extra.json'):
os.system("apt-get install {} -y".format(package))
@ -41,7 +41,7 @@ def run_custom_installs(ctx):
def install_atom_packages(ctx):
packages = " ".join(get_json('/atom/packages.json'))
packages = " ".join(_get_json('/atom/packages.json'))
os.system("apm install {}".format(packages))
@ -50,5 +50,5 @@ def install_configs(ctx):
if __name__ == '__main__':
print("Please run this file using waf, not directly.")
print("Please run this file using the install script, not directly.")
exit(1)