if len(sys.argv) > 1: if sys.argv[1] == 'bdist_rpm': CLEAR_BUILD = True rpm_depends = dependencies.get_uc2_rpm_depend() if sys.argv[1] == 'build_update': UPDATE_MODULES = True CLEAR_BUILD = True sys.argv[1] = 'build' if sys.argv[1] == 'bdist_deb': DEB_PACKAGE = True CLEAR_BUILD = True sys.argv[1] = 'build' deb_depends = dependencies.get_uc2_deb_depend() if sys.argv[1] == 'uninstall': if os.path.isdir(install_path): # removing sk1 folder print 'REMOVE: ' + install_path os.system('rm -rf ' + install_path) # removing scripts for item in scripts: filename = os.path.basename(item) print 'REMOVE: /usr/bin/' + filename os.system('rm -rf /usr/bin/' + filename) # removing data files for item in data_files: location = item[0] file_list = item[1]