mirror of
https://github.com/cmderdev/cmder.git
synced 2025-01-11 00:39:08 +08:00
Merge pull request #2 from sicil1ano/dev
Git directory cleanup ruby script
This commit is contained in:
commit
804126cf7d
@ -1,3 +0,0 @@
|
||||
@echo off
|
||||
SET CMDER_ROOT=%~dp0
|
||||
start %~dp0/vendor/conemu-maximus5/ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%CMDER_ROOT%\config\ConEmu.xml"
|
@ -1,6 +1,6 @@
|
||||
# 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.
|
||||
|
||||
@ -8,7 +8,7 @@ Cmder is a **software package** created out of pure frustration over absence of
|
||||
|
||||
## 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
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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.
|
26
gitcleanup.rb
Normal file
26
gitcleanup.rb
Normal file
@ -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
|
||||
|
14
pack.rb
14
pack.rb
@ -5,12 +5,13 @@ require "fileutils"
|
||||
|
||||
def create_archive name, exclude
|
||||
if exclude
|
||||
exclude = " -x!" + exclude
|
||||
exclude = " -x!cmder\\" + exclude
|
||||
else
|
||||
exclude = ""
|
||||
end
|
||||
system('ls')
|
||||
puts "Running 7z a -x@cmder\\packignore" + exclude + " " + name + " cmder"
|
||||
system("7z a -x@cmder\packignore + "+ name +" cmder")
|
||||
system("7z a -x@cmder\\packignore" + exclude + " " + name + " cmder")
|
||||
end
|
||||
|
||||
targets = [
|
||||
@ -24,11 +25,16 @@ unless system("git describe --abbrev=0 --tags")
|
||||
end
|
||||
|
||||
version = `git describe --abbrev=0 --tags`
|
||||
FileUtils.touch('Version ' + version)
|
||||
|
||||
FileUtils.touch('Version ' + version.chomp)
|
||||
FileUtils.rm('config/.history')
|
||||
|
||||
Dir.chdir('..')
|
||||
|
||||
targets.each do |ar|
|
||||
create_archive ar[0], ar[1]
|
||||
end
|
||||
|
||||
FileUtils.rm('Version ' + version)
|
||||
Dir.chdir('cmder')
|
||||
|
||||
FileUtils.rm('Version ' + version.chomp)
|
2
vendor/Readme.md
vendored
2
vendor/Readme.md
vendored
@ -1,3 +1,3 @@
|
||||
## Vendor
|
||||
|
||||
Software from third parties + init sctipt
|
||||
Third parties software & init script.
|
||||
|
Loading…
Reference in New Issue
Block a user