diff options
Diffstat (limited to 'ubuntu/aufs-update')
-rw-r--r-- | ubuntu/aufs-update | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/ubuntu/aufs-update b/ubuntu/aufs-update index d1ac0f97ca0..f50b1c806ce 100644 --- a/ubuntu/aufs-update +++ b/ubuntu/aufs-update @@ -9,9 +9,13 @@ aufs="$1" # Get the current tip name { read x url - read x osha1 + read x o_tip_sha1 + read x o_log_sha1 } <aufs/BOM +# Identify the tip of the standalone tree for reporting +n_tip_sha1=`( cd "$aufs" && git log --format=%H HEAD^..HEAD )` + # Update aufs to the latest. git rm -rf aufs cp -rp "$aufs/fs/aufs" aufs @@ -22,17 +26,18 @@ git checkout -f HEAD -- aufs/BOM # Reinsert the include update. #sed -i -e '1iEXTRA_CFLAGS += -I$(src)/include' aufs/Makefile -# Find the latest commit. -read x nsha1 <"$aufs/ChangeLog" +# Find the latest commit in the ChangeLog. +read x n_log_sha1 <"$aufs/ChangeLog" # Insert the new commit ID and commit the result. -sed -i -e "s/^COMMIT: .*/COMMIT: $nsha1/" aufs/BOM +sed -i -e "s/^COMMIT: .*/COMMIT: $n_tip_sha1/" aufs/BOM +sed -i -e "s/^CHANGELOG: .*/CHANGELOG: $n_log_sha1/" aufs/BOM git add aufs include/linux { - echo "UBUNTU: ubuntu: AUFS -- update to $nsha1" + echo "UBUNTU: ubuntu: AUFS -- update to $n_tip_sha1" echo "" awk <"$aufs/ChangeLog" ' - /^commit '"$osha1"'/ { exit } - { print " " $0 } + /^commit '"$o_log_sha1"'/ { exit } + { print " " $0 } ' } | git commit -s -F - |