]>
git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - debian/scripts/misc/gen-auto-reconstruct
3 if [ "$#" -ne 3 ]; then
4 echo "Usage: $0 <orig tag>|<base release> <reconstruct> <options>" 1>&2
13 *) tag
="v${tag%.*}" ;;
17 count
=$
( git tag
-l "$tag" |
wc -l )
18 if [ "$count" != 1 ]; then
19 echo "$0: $tag: tag invalid" 1>&2
23 #git ls-tree -r --full-tree HEAD | grep ^120 | \
24 #while read mode type blobid name
27 # Identify all new symlinks since the proffered tag.
28 echo "# Recreate any symlinks created since the orig."
29 git
diff "$tag.." --raw |
awk '(/^:000000 120000/ && $5 == "A") { print $NF }' | \
32 link
=$
( readlink
"$name" )
34 echo "[ ! -L '$name' ] && ln -sf '$link' '$name'"
37 # Identify all removed files since the proffered tag.
38 echo "# Remove any files deleted from the orig."
39 git
diff "$tag.." --raw |
awk '(/^:/ && $5 == "D") { print $NF }' | \
45 # All done, make sure this does not complete in error.
50 # Identify all new symlinks since the proffered tag.
51 echo "# Ignore any symlinks created since the orig which are rebuilt by reconstruct."
52 git
diff "$tag.." --raw |
awk '(/^:000000 120000/ && $5 == "A") { print $NF }' | \
55 echo "extend-diff-ignore=$name"
60 head='^## autoreconstruct -- begin$'
61 foot
='^## autoreconstruct -- end$'
72 rm -f "$options.update"