Skip to content

Commit 871bc17

Browse files
author
Federico Fissore
committed
Added lib_sync, utility script
1 parent 5519f15 commit 871bc17

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

lib_sync

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/bash -ex
2+
3+
git checkout master
4+
5+
LIB=$1
6+
7+
git branch lib_$LIB
8+
git checkout lib_$LIB
9+
10+
git filter-branch -f --prune-empty --subdirectory-filter libraries/$LIB lib_$LIB
11+
12+
cd ../libraries
13+
mkdir $LIB
14+
cd $LIB
15+
16+
git init
17+
18+
git pull ../../Arduino lib_$LIB
19+
20+
git config user.email [email protected]
21+
22+
git filter-branch -f --commit-filter 'if [ "$GIT_AUTHOR_EMAIL" = "[email protected]" ];
23+
then export [email protected];
24+
fi; git commit-tree "$@"'
25+
git filter-branch -f --commit-filter 'if [ "$GIT_AUTHOR_EMAIL" = "[email protected]" ];
26+
then export [email protected];
27+
fi; git commit-tree "$@"'
28+
git filter-branch -f --commit-filter 'if [ "$GIT_AUTHOR_EMAIL" = "[email protected]" ];
29+
then export [email protected];
30+
fi; git commit-tree "$@"'
31+
git filter-branch -f --commit-filter 'if [ "$GIT_AUTHOR_EMAIL" = "[email protected]" ];
32+
then export [email protected];
33+
fi; git commit-tree "$@"'
34+
git filter-branch -f --commit-filter 'if [ "$GIT_AUTHOR_EMAIL" = "[email protected]" ];
35+
then export [email protected];
36+
fi; git commit-tree "$@"'
37+
git filter-branch -f --commit-filter 'if [ "$GIT_AUTHOR_EMAIL" = "[email protected]" ];
38+
then export [email protected];
39+
fi; git commit-tree "$@"'
40+
41+
git remote add origin [email protected]:arduino-libraries/$LIB.git
42+
git fetch --all
43+
44+
cd ../../Arduino
45+
46+
git checkout master
47+
git branch -D lib_$LIB
48+

0 commit comments

Comments
 (0)