mirror of
https://github.com/cmderdev/cmder.git
synced 2025-04-18 07:32:30 +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
|
# 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 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
|
## 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
|
## Installation
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
## Bin
|
## 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
|
## 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
|
def create_archive name, exclude
|
||||||
if exclude
|
if exclude
|
||||||
exclude = " -x!" + exclude
|
exclude = " -x!cmder\\" + exclude
|
||||||
else
|
else
|
||||||
exclude = ""
|
exclude = ""
|
||||||
end
|
end
|
||||||
|
system('ls')
|
||||||
puts "Running 7z a -x@cmder\\packignore" + exclude + " " + name + " cmder"
|
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
|
end
|
||||||
|
|
||||||
targets = [
|
targets = [
|
||||||
@ -24,11 +25,16 @@ unless system("git describe --abbrev=0 --tags")
|
|||||||
end
|
end
|
||||||
|
|
||||||
version = `git describe --abbrev=0 --tags`
|
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|
|
targets.each do |ar|
|
||||||
create_archive ar[0], ar[1]
|
create_archive ar[0], ar[1]
|
||||||
end
|
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
|
## Vendor
|
||||||
|
|
||||||
Software from third parties + init sctipt
|
Third parties software & init script.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user