3 # NOTE: See aufs/BOM.UPDATING for instructions on how to use this updater.
6 if [ "$#" -ne 1 ]; then
7 echo "Usage: $0 <aufs2-standalone directory>" 1>&2
12 # Get the current tip name
19 # Identify the tip of the standalone tree for reporting
20 n_tip_sha1=`( cd "$aufs" && git log --format=%H HEAD^..HEAD )`
22 # Update aufs to the latest.
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
29 # Reinsert the include update.
30 #sed -i -e '1iEXTRA_CFLAGS += -I$(src)/include' aufs/Makefile
32 # Fix the relative patch references ...
33 sed -i -e 's@/include/@/ubuntu/include/@g;' aufs/Makefile
35 ## # Find the latest commit in the ChangeLog.
36 ## read x n_log_sha1 <"$aufs/ChangeLog"
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
42 git add aufs include/linux
44 echo "UBUNTU: ubuntu: AUFS -- update to $n_tip_sha1"
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 }
51 } | git commit -s -F -