X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=contrib%2Fhack.2;fp=contrib%2Fhack.2;h=0000000000000000000000000000000000000000;hb=0b523c435c01ba9f4c2fd258baabb792546b7836;hp=15b44ba32eaab44fc1039c872e254df9211db796;hpb=8d194d3676a27055a8a5f35a53a162334a090d26;p=dak.git diff --git a/contrib/hack.2 b/contrib/hack.2 deleted file mode 100755 index 15b44ba3..00000000 --- a/contrib/hack.2 +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python - -import os, pg, stat, string, sys -import utils, db_access -import apt_pkg, apt_inst; - - -def remove(file): - dir = '/org/ftp.debian.org/morgue/shania/' - if os.access(file,os.R_OK) == 0: - sys.stderr.write("E: can't read '%s' to remove it.\n" % (file)); - return; - dest = dir + os.path.basename(file); - if os.path.exists(dest): - sys.stderr.write("E: '%s' already exists in '%s'.\n" % (file, dir)); - return; - print "%s -> %s" % (file, dir); - utils.move(file, dest); - return; - -def main (): - for changes_file in sys.argv[1:]: - try: - changes = utils.parse_changes(changes_file, 0); - except: - sys.stderr.write("E: caught exception parsing '%s' [%s].\n" % (changes_file, sys.exc_type)); - continue; - try: - files = utils.build_file_list(changes, ""); - except: - sys.stderr.write("E: caught exception building file list for '%s' [%s].\n" % (changes_file, sys.exc_type)); - continue; - for file in files.keys(): - remove(file); - remove(changes_file); - -####################################################################################### - -if __name__ == '__main__': - main() -