#! /usr/bin/env python

import os
print " \n\
======================================================\n\
| This script fetches the latest svn-version of the  |\n\
| KDE 4 iconset oxygen. Should be run as root for    |\n\
| installation...                                0.3 |\n\
======================================================\n\
\n\
start checking out svn (or updating)\n\
\n\
when starting a fresh download, this could take some time.\n\
updating should only take a few seconds,\n\
depending on the version you already have."
print
print "[1] download oxygen iconset\n\
[2] update iconset"
choice = input('what do you want to do?')
if choice == 2:
  os.system("svn up svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebase/runtime/pics/oxygen")
  print "done updating"
else:
  os.system("svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebase/runtime/pics/oxygen")
  print "done downloading"
print
print "[1] install the iconset to /usr/share/icons/ (must be root)\n\
[2] or don't do anything"
choice = input('what do you want to do?')
if choice == 1:
  os.system("cp -R oxygen/ /usr/share/icons/")
  print "done installing"
else:
  print "not installing"
print
print "[1] remove the original downloaded folder (keep it if you want to update later)\n\
[2] keep the original folder"
choice = input("what do you want to do?")
if choice == 1:
  os.system("sudo rm -R oxygen/")
  print "done removing"
else:
  print "not removing"
print
print "all done"

