352594203dc4d76618dbe1df6d7ae34de2fd2418
[valse.git] / initialize.sh
1 #!/bin/sh
2 # Script for devs
3
4 #initialize submodules, set-up .git/config and .gitattributes, and pre-push hook
5 git submodule init && git submodule update --merge
6
7 #filter for git-fat
8 printf \
9 '*.pdf filter=fat
10 *.tar.xz filter=fat
11 *.png filter=fat
12 *.jpg filter=fat
13 *.ps filter=fat\n' > .gitattributes
14
15 #filter for Jupyter
16 python .nbstripout/nbstripout.py --install --attributes .gitattributes
17
18 #pre-commit and pre-push hooks: indentation, git fat push, submodules update
19 cp hooks/* .git/hooks/
20
21 #install formatR
22 echo 'if (! "formatR" %in% rownames(installed.packages()))
23 install.packages("formatR",repos="https://cloud.r-project.org")' | R --slave
24
25 #.gitfat file with remote on gitfat@auder.net
26 printf '[rsync]\nremote = gitfat@auder.net:~/files/valse\n' > .gitfat
27
28 #Now run git-fat init :)