-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththemepatch.sh
More file actions
43 lines (35 loc) · 868 Bytes
/
themepatch.sh
File metadata and controls
43 lines (35 loc) · 868 Bytes
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
RAMPDIR='C:\Users\Aleksueir\Code\TFS2013'
THEMES='canada intranet usability fgp-int'
THEME=$1
BRANCH=$2
PATCH=$3
STARTDIR=`pwd`
#Usage:
#ramp-theme-patch [theme-name] [branch name] [patch command]
#
#theme-name is the name of the theme where the changes are
#patch command is indicating changes to propagate; can be something like "-1 <sha>" for a single commit patch or "master" for changes from the current against master
makepatch()
{
git format-patch $PATCH --stdout > $RAMPDIR/p_auto.patch
}
patchtheme()
{
git am --abort
git am --signoff $RAMPDIR/p_auto.patch
}
rm -f $RAMPDIR/p_auto.patch
cd $RAMPDIR/ramp-theme-$THEME
git co $BRANCH
git pull
makepatch
for t in $THEMES; do
cd $RAMPDIR/ramp-theme-$t
if [ "$t" != "$THEME" ]; then
git co $BRANCH
git pull
patchtheme
fi
done
rm -f $RAMPDIR/p_auto.patch
cd $STARTDIR