ghfw-build-extra/github-extra/github-extra.install

126 строки
2.4 KiB
Plaintext

export LC_ALL=C
post_install () {
for dir in mingw32 mingw64
do
test ! -d /$dir ||
test -f /$dir/etc/gitconfig ||
cat > /$dir/etc/gitconfig <<\GITCONFIG
[alias]
c = commit
co = checkout
dt = difftool
mt = mergetool
praise = blame
ff = merge --ff-only
st = status
sync = !git pull && git push
[apply]
whitespace = nowarn
[core]
symlinks = false
autocrlf = true
editor = gitpad
preloadindex = true
fscache = true
[color]
diff = auto
status = auto
branch = auto
interactive = true
ui = true
[pack]
packSizeLimit = 2g
[help]
format = html
[http]
sslcainfo = /usr/ssl/certs/ca-bundle.crt
[diff "astextplain"]
textconv = astextplain
[rebase]
autosquash = true
[credential]
helper = !github --credentials
[filter "ghcleansmudge"]
clean = cat
smudge = cat
[push]
default = upstream
[diff]
tool = vs2013
algorithm = histogram
[difftool]
prompt = false
[difftool "bc4"]
cmd = \"c:/program files (x86)/beyond compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\"
[difftool "p4"]
cmd = \"c:/program files/Perforce/p4merge.exe\" \"$LOCAL\" \"$REMOTE\"
[difftool "vs2012"]
cmd = \"c:/program files (x86)/microsoft visual studio 11.0/common7/ide/devenv.exe\" '//diff' \"$LOCAL\" \"$REMOTE\"
[difftool "vs2013"]
cmd = \"c:/program files (x86)/microsoft visual studio 12.0/common7/ide/devenv.exe\" '//diff' \"$LOCAL\" \"$REMOTE\"
[merge]
tool = bc3
[mergetool]
prompt = false
keepBackup = false
[mergetool "bc3"]
cmd = \"c:/program files (x86)/beyond compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
trustExitCode = true
[mergetool "p4"]
cmd = \"c:/program files/Perforce/p4merge.exe\" \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
trustExitCode = false
GITCONFIG
test ! -d /$dir ||
test -f /$dir/etc/gitattributes ||
cat > /$dir/etc/gitattributes <<\GITATTRIBUTES
# Custom for Visual Studio
*.cs diff=csharp
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
GITATTRIBUTES
done
test -f /etc/ssh/ssh_config ||
cat > /etc/ssh/ssh_config <<\SSHCONFIG
Host *
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
Host github.com
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
IdentityFile=~/.ssh/github_rsa
SSHCONFIG
}
post_upgrade () {
post_install
}