serial: PL011: clear pending interrupts
[linux-flexiantxendom0.git] / ubuntu / aufs-update
1 #!/bin/bash
2 #
3 # NOTE: See aufs/BOM.UPDATING for instructions on how to use this updater.
4 #
5
6 if [ "$#" -ne 1 ]; then
7         echo "Usage: $0 <aufs2-standalone directory>" 1>&2
8         exit 1
9 fi
10 aufs="$1"
11
12 # Get the current tip name
13 {
14         read x url
15         read x o_log_sha1
16         read x o_tip_sha1
17 } <aufs/BOM
18
19 # Identify the tip of the standalone tree for reporting
20 n_tip_sha1=`( cd "$aufs" && git log --format=%H HEAD^..HEAD )`
21
22 # Update aufs to the latest.
23 git rm -rf aufs
24 cp -rp "$aufs/fs/aufs" aufs
25 #cp -rp "$aufs/include" aufs
26 cp -rp "$aufs/include/linux"/*.h include/linux
27 git checkout -f HEAD -- aufs/BOM aufs/BOM.UPDATING
28
29 # Reinsert the include update.
30 #sed -i -e '1iEXTRA_CFLAGS += -I$(src)/include' aufs/Makefile
31
32 # Fix the relative patch references ...
33 sed -i -e 's@/include/@/ubuntu/include/@g;' aufs/Makefile
34
35 ## # Find the latest commit in the ChangeLog.
36 ## read x n_log_sha1 <"$aufs/ChangeLog"
37
38 # Insert the new commit ID and commit the result.
39 sed -i -e "s/^COMMIT: .*/COMMIT: $n_tip_sha1/" aufs/BOM
40 sed -i -e "s/^CHANGELOG: .*/CHANGELOG: $n_log_sha1/" aufs/BOM
41
42 git add aufs include/linux
43 {
44         echo "UBUNTU: ubuntu: AUFS -- update to $n_tip_sha1"
45         echo ""
46         (cd "$aufs" && git log --no-merges "$o_tip_sha1..$n_tip_sha1" | git shortlog)
47 ##      awk <"$aufs/ChangeLog" '
48 ##              /^commit '"$o_log_sha1"'/       { exit }
49 ##                                              { print "    " $0 }
50 ##      '
51 } | git commit -s -F -