adding sudocheck and vimdir

This commit is contained in:
staticsafe 2012-01-05 14:19:47 -05:00
parent e6b552268b
commit 78e4291917

View File

@ -12,15 +12,16 @@ import urllib2
vimrcurl = "https://raw.github.com/staticsafe/dotfiles/master/.vimrc" vimrcurl = "https://raw.github.com/staticsafe/dotfiles/master/.vimrc"
zshrcurl = "https://raw.github.com/staticsafe/dotfiles/master/.zshrc" zshrcurl = "https://raw.github.com/staticsafe/dotfiles/master/.zshrc"
tmuxurl = "https://raw.github.com/staticsafe/dotfiles/master/.tmux.conf" tmuxurl = "https://raw.github.com/staticsafe/dotfiles/master/.tmux.conf"
vimdirurl = "https://github.com/staticsafe/dotfiles/raw/master/vimdir.tar.bz2"
def rootcheck(): def sudocheck():
#rootcheck #sudocheck
uid = os.getuid() sudopath = "/usr/bin/sudo"
if uid != 0: if os.path.isfile(sudopath) == True:
print 'This script must be run with sudo if you have it!' print 'This script needs sudo to run!'
raise SystemExit raise SystemExit
else: else:
print 'Root check: PASSED!' print 'Sudo check: PASSED!'
def urldownload(confurl = ""): def urldownload(confurl = ""):
#Thanks PabloG from StackExchange for this little snippet - http://stackoverflow.com/a/22776 #Thanks PabloG from StackExchange for this little snippet - http://stackoverflow.com/a/22776
@ -51,7 +52,8 @@ def confdownload():
urldownload(confurl = vimrcurl) urldownload(confurl = vimrcurl)
urldownload(confurl = zshrcurl) urldownload(confurl = zshrcurl)
urldownload(confurl = tmuxurl) urldownload(confurl = tmuxurl)
urldownload(confurl = vimdirurl)
untar = call("tar xvf vimdir.tar.bz2", shell = True)
def envArch(): def envArch():
#Install relevant packagtes #Install relevant packagtes