fix stage2.R
[epclust.git] / initialize.sh
CommitLineData
df89f101
BA
1#!/bin/sh
2
3#initialize submodules, set-up .git/config and .gitattributes, and pre-push hook
4git submodule init && git submodule update --merge
a810626c 5#filter for git-fat
df89f101
BA
6echo -e '*.pdf filter=fat\n*.tar.xz filter=fat' > .gitattributes
7#pre-push hook: git fat push, submodules update
c3fcb4f1 8echo -e '#!/bin/sh\n./.git-fat/git-fat pull\n./.git-fat/git-fat push\ngit submodule update --merge' > .git/hooks/pre-push
070a71a1 9chmod 755 .git/hooks/pre-push
df89f101 10#.gitfat file with remote on gitfat@auder.net
1c6f223e 11echo -e '[rsync]\nremote = gitfat@auder.net:~/files/edfclust' > .gitfat
df89f101
BA
12#manual git-fat init: with relative path to binary
13#1] remove filter if exists http://stackoverflow.com/questions/12179437/replace-3-lines-with-another-line-sed-syntax
14sed -i '1N;$!N;s/\[filter "fat"\]\n.*\n.*//;P;D' .git/config
15#2] place new filter
1ddd1df2 16echo -e '[filter "fat"]\n\tclean = ./.git-fat/git-fat filter-clean\n\tsmudge = ./.git-fat/git-fat filter-smudge' >> .git/config