Fixed a load of things!
This commit is contained in:
parent
50a78df3a8
commit
b70664a38a
6 changed files with 36 additions and 41 deletions
|
@ -22,14 +22,10 @@ EXEC_ORDER = [
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
t0 = "temp_time"
|
||||
if os.geteuid() != 0:
|
||||
print("Please run as root!")
|
||||
elif input("Are you sure you want to install (allthethings)? [Y/N]: ").lower() == 'y':
|
||||
t0 = time.time()
|
||||
for script in EXEC_ORDER:
|
||||
script()
|
||||
print("\n>> {} Exe1cuted.\n".format(script.__name__))
|
||||
t1 = time.time()
|
||||
t0 = time.time()
|
||||
for script in EXEC_ORDER:
|
||||
script()
|
||||
print("\n>> {} Exescuted.\n".format(script.__name__))
|
||||
t1 = time.time()
|
||||
print("Execution Complete")
|
||||
print("Took {} seconds.".format(t1 - t0))
|
||||
print("Took {} seconds.".format(int(t1 - t0)))
|
||||
|
|
|
@ -1,21 +1,24 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
HCLINE="deb http://downloads.hipchat.com/linux/apt stable main"
|
||||
HCFILE=/etc/apt/sources.list.d/atlassian-hipchat.list
|
||||
|
||||
if [ -a /etc/apt/sources.list.d/atlassian-hipchat.list ]; then
|
||||
echo "deb http://downloads.hipchat.com/linux/apt stable main" >> /etc/apt/sources.list.d/atlassian-hipchat.list
|
||||
fi
|
||||
ILINE="deb http://apt.insynchq.com/ubuntu wily non-free contrib"
|
||||
IFILE=/etc/apt/sources.list.d/atlassian-hipchat.list
|
||||
|
||||
VLINE="deb http://download.virtualbox.org/virtualbox/debian wily contrib"
|
||||
VFILE=/etc/apt/sources.list.d/virtualbox.list
|
||||
|
||||
OCLINE="deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/xUbuntu_15.10/ /"
|
||||
OCFILE=/etc/apt/sources.list.d/owncloud-client.list
|
||||
|
||||
|
||||
if [ -a /etc/apt/sources.list.d/insync.list ]; then
|
||||
echo "deb http://apt.insynchq.com/ubuntu wily non-free contrib" >> /etc/apt/sources.list.d/insync.list
|
||||
fi
|
||||
echo ">> Removing old files..."
|
||||
rm -rf $HCFILE $IFILE $VFILE $OCFILE
|
||||
touch $HCFILE $IFILE $VFILE $OCFILE
|
||||
|
||||
|
||||
if [ -a /etc/apt/sources.list.d/virtualbox.list ]; then
|
||||
echo "deb http://download.virtualbox.org/virtualbox/debian wily contrib" >> /etc/apt/sources.list.d/virtualbox.list
|
||||
if
|
||||
|
||||
|
||||
if [ -a /etc/apt/sources.list.d/owncloud-client.list ]; then
|
||||
echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/xUbuntu_15.10/ /' >> /etc/apt/sources.list.d/owncloud-client.list
|
||||
fi
|
||||
echo "Adding new sources..."
|
||||
echo "$HCLINE" >> "$HCFILE"
|
||||
echo "$ILINE" >> "$IFILE"
|
||||
echo "$VLINE" >> "$VFILE"
|
||||
echo "$OCLINE" >> "$OCFILE"
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
"hipchat",
|
||||
"insync",
|
||||
"kodi",
|
||||
"mutate",
|
||||
"nodejs",
|
||||
"owncloud-client",
|
||||
"remmina",
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[
|
||||
"ppa:team-xbmc/ppa",
|
||||
"ppa:mutate/ppa",
|
||||
"ppa:remmina-ppa-team/remmina-next",
|
||||
"ppa:zeal-developers/ppa"
|
||||
]
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
echo ">> Collecting Packages..."
|
||||
wget https://atom.io/download/deb -O atom.deb
|
||||
wget "https://www.astrill.com/downloads/astrill-setup-linux64.deb?mirror=uk" -O astrill.deb
|
||||
curl -sL https://deb.nodesource.com/setup_5.x | bash -
|
||||
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
|
||||
|
||||
echo ">> Installing Packages..."
|
||||
dpkg -i atom.deb
|
||||
|
|
|
@ -3,6 +3,7 @@ import json, os, shutil
|
|||
|
||||
|
||||
DIR = os.getcwd()
|
||||
HOME = os.path.expanduser('~')
|
||||
|
||||
|
||||
def _get_json(path):
|
||||
|
@ -10,36 +11,36 @@ def _get_json(path):
|
|||
|
||||
|
||||
def update():
|
||||
os.system('apt-get update -y')
|
||||
os.system('sudo apt-get update -y')
|
||||
|
||||
|
||||
def apt_upgrade():
|
||||
os.system('apt-get upgrade -y')
|
||||
os.system('apt-get dist-upgrade -y')
|
||||
os.system('sudo apt-get upgrade -y')
|
||||
os.system('sudo apt-get dist-upgrade -y')
|
||||
|
||||
|
||||
def apt_install_core():
|
||||
packages = " ".join(_get_json('/apt/apt-installs-core.json'))
|
||||
os.system("apt-get install {} -y".format(packages))
|
||||
os.system("sudo apt-get install {} -y".format(packages))
|
||||
|
||||
|
||||
def add_apt_keys():
|
||||
for key in _get_json('/apt/apt-keys.json'):
|
||||
os.system("wget -O - {} | apt-key add -".format(key))
|
||||
os.system("wget -O - {} | sudo apt-key add -".format(key))
|
||||
|
||||
|
||||
def add_apt_sources():
|
||||
os.system('apt/add-apt-sources.sh')
|
||||
os.system('sudo apt/add-apt-sources.sh')
|
||||
|
||||
|
||||
def add_apt_repos():
|
||||
for repo in _get_json('/apt/apt-repos.json'):
|
||||
os.system("add-apt-repository {} -y".format(repo))
|
||||
os.system("sudo add-apt-repository {} -y".format(repo))
|
||||
|
||||
|
||||
def apt_install_extras():
|
||||
packages = " ".join(_get_json('/apt/apt-installs-extra.json'))
|
||||
os.system("apt-get install {} -y".format(packages))
|
||||
os.system("sudo apt-get install {} -y".format(packages))
|
||||
|
||||
|
||||
def run_custom_installs():
|
||||
|
@ -58,8 +59,8 @@ def export_atom_config():
|
|||
|
||||
def install_configs():
|
||||
os.makedirs("~/.config/terminator/", exist_ok=True)
|
||||
shutil.copyfile(DIR + "/config/terminator.conf", "~/.config/terminator/config")
|
||||
shutil.copyfile(DIR + "/bash/.bash_aliases", "~/.bash_aliases")
|
||||
shutil.copyfile(os.path.join(DIR, "config/terminator.conf"), os.path.expanduser("~/.config/terminator/config"))
|
||||
shutil.copyfile(os.path.join(DIR, "bash/.bash_aliases"), os.path.expanduser("~/.bash_aliases"))
|
||||
|
||||
|
||||
def source():
|
||||
|
|
Loading…
Reference in a new issue