/
do_it_all
executable file
·46 lines (37 loc) · 1.1 KB
/
do_it_all
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
44
45
#!/bin/bash
VERSION=$1
if [ "$VERSION" == "" ] ; then
echo "you need a version!"
exit
fi
echo "VERSION=$VERSION"
DIR="queue-2.6.$VERSION"
# create a temp directory and copy the patches there
# FIXME, use a "real" temp directory name, not just tmp, as that messes things
# up when the script is run twice at the same time for different versions.
mkdir ../tmp
git ls-files -o | grep queue-2\.6\.$VERSION | xargs -i cp {} -v ../tmp/
# create a commit message
# FIXME, use a "real" temporary file name, not just 'commit.msg'
echo "2.6.${VERSION}-stable patches" > commit.msg
echo "" >> commit.msg
echo "added patches:" >> commit.msg
for file in `ls ../tmp/`
do
echo " `basename $file`" >> commit.msg
done
# add the files and commit them to git
git add $DIR
git commit $DIR -F commit.msg
rm commit.msg
# do notification for the authors that the patches are now added to the tree.
for file in `ls ../tmp/`
do
../added-to-longterm-version $VERSION ../tmp/$file
done
rm -rf ../tmp/
ONLINE=`gregkh_machine_online`
# Only push if we have a network connection
if [ "$ONLINE" = "1" ] ; then
git push kroah.com && git push
fi