diff --git a/INSTALL_ALL_THE_THINGS b/INSTALL_ALL_THE_THINGS index 27e885f..b0202a0 100755 --- a/INSTALL_ALL_THE_THINGS +++ b/INSTALL_ALL_THE_THINGS @@ -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() diff --git a/install-waf.sh b/install-waf.sh deleted file mode 100755 index 2ad1e35..0000000 --- a/install-waf.sh +++ /dev/null @@ -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!" diff --git a/wscript b/wscript index f9a1c79..475c086 100644 --- a/wscript +++ b/wscript @@ -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)