Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git exe Cleanup. #85

Merged
merged 11 commits into from
Dec 24, 2013
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Cmder

**Yes, you can [download latest release](https://github.com/bliker/cmder/releases)**
Latest release is **[v1.1.2](https://github.com/bliker/cmder/releases/tag/v1.1.2)**

Cmder is a **software package** created out of pure frustration over absence of usable console emulator on Windows. It is based on [ConEmu](https://code.google.com/p/conemu-maximus5/) with *major* config overhaul. Monokai color scheme, amazing [clink](https://code.google.com/p/clink/) and custom prompt layout.

![Cmder Screenshot](http://i.imgur.com/g1nNf0I.png)

## Why use it

The main advantage of Cmder is portability. It is designed to be totally self-contained with no external dependencies. That makes it great for **USB Sticks** or **Dropbox**. So you can carry your console, aliases and binaries (like wget, curl and git) with you anywhere.
The main advantage of Cmder is portability. It is designed to be totally self-contained with no external dependencies, that is makes it great for **USB Sticks** or **Dropbox**. So you can carry your console, aliases and binaries (like wget, curl and git) with you anywhere.

## Installation

Expand Down
2 changes: 1 addition & 1 deletion bin/Readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## Bin

This folder will be injected into path at runtime
This folder will be injected into the PATH environment variable at runtime.
2 changes: 1 addition & 1 deletion config/Readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## Config

All config files must be in this folder, if there is no option to set the folder directly, it has to be hardlinked.
All config files must be in this folder. If there is no option to set this folder directly, it has to be hardlinked.
24 changes: 24 additions & 0 deletions gitcleanup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
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()
26 changes: 26 additions & 0 deletions gitcleanup.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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

2 changes: 1 addition & 1 deletion vendor/Readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## Vendor

Software from third parties + init sctipt
Third parties software & init script.