Remove WAF
This commit is contained in:
parent
1004d53e73
commit
37cda23222
3 changed files with 12 additions and 31 deletions
|
@ -16,13 +16,10 @@ if __name__ == '__main__':
|
||||||
if os.geteuid() != 0:
|
if os.geteuid() != 0:
|
||||||
print("Please run as root!")
|
print("Please run as root!")
|
||||||
elif input("Are you sure you want to install (allthethings)? [Y/N]: ").lower() == 'y':
|
elif input("Are you sure you want to install (allthethings)? [Y/N]: ").lower() == 'y':
|
||||||
os.system('./install-waf.sh')
|
scripts = []
|
||||||
waf_scripts = []
|
|
||||||
for key, func in get_functions().items():
|
for key, func in get_functions().items():
|
||||||
if type(func).__name__ == 'function':
|
if type(func).__name__ == 'function' and func.__name__[0] != '_':
|
||||||
waf_scripts.append(key)
|
scripts.append(func)
|
||||||
|
|
||||||
for func in waf_scripts:
|
for func in scripts:
|
||||||
cmd = "waf {}".format(func)
|
func()
|
||||||
print("Running {}".format(cmd))
|
|
||||||
os.system("sudo " + cmd)
|
|
||||||
|
|
|
@ -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
14
wscript
|
@ -3,7 +3,7 @@ import json, os, shutil
|
||||||
|
|
||||||
DIR = os.getcwd()
|
DIR = os.getcwd()
|
||||||
|
|
||||||
def get_json(path):
|
def _get_json(path):
|
||||||
return json.load(open(DIR + path))
|
return json.load(open(DIR + path))
|
||||||
|
|
||||||
def update_and_upgrade(ctx):
|
def update_and_upgrade(ctx):
|
||||||
|
@ -13,12 +13,12 @@ def update_and_upgrade(ctx):
|
||||||
|
|
||||||
|
|
||||||
def apt_install_core(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))
|
os.system("apt-get install {} -y".format(package))
|
||||||
|
|
||||||
|
|
||||||
def add_apt_keys(ctx):
|
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))
|
os.system("wget -O - {} | apt-key add -".format(key))
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,12 +27,12 @@ def add_apt_sources(ctx):
|
||||||
|
|
||||||
|
|
||||||
def add_apt_repos(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))
|
os.system("add-apt-repository {} -y".format(repo))
|
||||||
|
|
||||||
|
|
||||||
def apt_install_extras(ctx):
|
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))
|
os.system("apt-get install {} -y".format(package))
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ def run_custom_installs(ctx):
|
||||||
|
|
||||||
|
|
||||||
def install_atom_packages(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))
|
os.system("apm install {}".format(packages))
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,5 +50,5 @@ def install_configs(ctx):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
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)
|
exit(1)
|
||||||
|
|
Loading…
Reference in a new issue