From c43ad3cb40952078beee72c1e83b30ddad889e13 Mon Sep 17 00:00:00 2001 From: Samuel Vasko Date: Tue, 31 Dec 2013 15:23:24 +0100 Subject: [PATCH] Cleanup of the cleanup file Moved the cleanup to another branch --- gitcleanup.py | 24 ------------------------ gitcleanup.rb | 26 -------------------------- 2 files changed, 50 deletions(-) delete mode 100644 gitcleanup.py delete mode 100644 gitcleanup.rb diff --git a/gitcleanup.py b/gitcleanup.py deleted file mode 100644 index 57213bd..0000000 --- a/gitcleanup.py +++ /dev/null @@ -1,24 +0,0 @@ -import os - -def main(): - cwd = os.getcwd() - os.chdir(cwd + '\\vendor\\msysgit\\libexec\\git-core\\') - for file_ in os.listdir(cwd + '\\vendor\\msysgit\\libexec\\git-core\\'): - if file_ == 'git.exe' or file_ == 'mergetools' or file_.endswith('.bat'): - continue # Ignore main git exe, mergetools folder and already created batch files. - if file_.endswith('.exe'): - with open(os.path.splitext(file_)[0] + '.bat', 'w') as out: - out.write('@ECHO OFF\n' + os.path.splitext(file_)[0].replace('-',' ') + ' $*') - os.remove(file_) - # print 'Cleaned out ' + file_ - continue - else: - with open(file_ + '.bat', 'w') as out: - out.write('@ECHO OFF\n' + file_.replace('-', ' ') + ' $*') - os.remove(file_) - # print 'Cleaned out ' + file_ - continue - pass - -if __name__ == '__main__': - main() diff --git a/gitcleanup.rb b/gitcleanup.rb deleted file mode 100644 index 2a1c8f8..0000000 --- a/gitcleanup.rb +++ /dev/null @@ -1,26 +0,0 @@ -def main() - git_dir = '\\vendor\\msysgit\\libexec\\git-core\\' - working_dir = Dir.pwd - Dir.chdir(working_dir + git_dir) - Dir.entries(working_dir + git_dir).each do |file| - if file == 'git.exe' or file == 'mergetools' or file.end_with?('.bat') then - next - end - if file.end_with?('.exe') then - File.open(File.basename(file, '.*') + '.bat', "w") do |new_file| - new_file.write('@ECHO OFF\n' + File.basename(file, '.*').gsub('-',' ') + ' $*') - end - File.delete(file) - next - elsif file.end_with?('.bat') then - File.open(file + '.bat', "w") do |new_file| - new_file.write('@ECHO OFF\n' + file.gsub('-', ' ') + ' $*') - end - File.delete(file) - next - end - end -end - -main -