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

Diff for: 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 f.fissore@arduino.cc
21+
22+
git filter-branch -f --commit-filter 'if [ "$GIT_AUTHOR_EMAIL" = "f.vanzati@gmail.com" ];
23+
then export GIT_AUTHOR_EMAIL=f.vanzati@arduino.cc;
24+
fi; git commit-tree "$@"'
25+
git filter-branch -f --commit-filter 'if [ "$GIT_AUTHOR_EMAIL" = "federico@fissore.org" ];
26+
then export GIT_AUTHOR_EMAIL=f.fissore@arduino.cc;
27+
fi; git commit-tree "$@"'
28+
git filter-branch -f --commit-filter 'if [ "$GIT_AUTHOR_EMAIL" = "c.maglie@bug.st" ];
29+
then export GIT_AUTHOR_EMAIL=c.maglie@arduino.cc;
30+
fi; git commit-tree "$@"'
31+
git filter-branch -f --commit-filter 'if [ "$GIT_AUTHOR_EMAIL" = "tigoe@tigoemac.itp.tsoa.nyu.edu" ];
32+
then export GIT_AUTHOR_EMAIL=t.igoe@arduino.cc;
33+
fi; git commit-tree "$@"'
34+
git filter-branch -f --commit-filter 'if [ "$GIT_AUTHOR_EMAIL" = "tom.igoe@gmail.com" ];
35+
then export GIT_AUTHOR_EMAIL=t.igoe@arduino.cc;
36+
fi; git commit-tree "$@"'
37+
git filter-branch -f --commit-filter 'if [ "$GIT_AUTHOR_EMAIL" = "facchinm@users.noreply.github.com" ];
38+
then export GIT_AUTHOR_EMAIL=m.facchin@arduino.cc;
39+
fi; git commit-tree "$@"'
40+
41+
git remote add origin git@github.com: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)