blob: e834d4e3a917eca50c3f48369a7964e62dbf0191 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/bash
#
# Separate security tracker data form the "binaries"
#
# With no option the data repo will be built, with
# "--binary" the binary repo will be built
#
# This will be run only once when migrating from svn to git
FILTER='^(conf|data|doc|org|packages|stamps)/|^TODO.gitmigration|^Makefile|^.gitignore'
BRANCH=master
OUT=v
if [ "$1" == "--binary" ]; then
OUT=
fi
git filter-branch \
--prune-empty \
--index-filter "
git ls-tree -z -r --name-only --full-tree \$GIT_COMMIT \
| grep -zZE'${OUT}' '"${FILTER}"' \
| xargs -0 -r git rm --cached -r
" \
-- \
"${BRANCH}"
|