3 reldir=$HOME/linux-libre/releases
5 key=474402C8C582DAFBE389C427BCB7CF877E7D47A7
11 rup=$(echo "$rel" | sed 's,-gnu[0-9]*$,,')
12 cbr=$(echo "$rup" | sed 's,\(\.\|-rc\)[0-9]*$,,')
14 if test -d $reldir/$rel; then
15 echo $reldir/$rel exists >&2
19 if test -h $reldir/LATEST-$cbr.0; then
20 prev0=$(readlink $reldir/LATEST-$cbr.0)
21 prevn=$(readlink $reldir/LATEST-$cbr.N)
22 elif test -h $reldir/LATEST-$rup.N; then
24 prev0=$(readlink $reldir/LATEST-$cbr.0)
25 prevn=$(readlink $reldir/LATEST-$cbr.N)
27 echo Neither $reldir/LATEST-$cbr.0 nor $reldir/LATEST-$rup.N exist >&2
31 DATE=$(git cat-file -p incr/v$rel |
32 gawk '/^(author|tagger)/ {
33 print strftime(PROCINFO["strftime"], $(NF-1))
35 export GIT_COMMITTER_DATE=$DATE GIT_AUTHOR_DATE=$DATE &&
37 if test -f linux-libre-$rel.check; then
38 echo linux-libre-$rel.check exists, abandoning this release
39 git tag -d incr/v$rel logs/v$rel sources/v$rel |&
40 tee -a linux-libre-$rel.dtags
44 while test -f linux-libre-$rel.patck; do
45 echo please verify linux-libre-$rel.patck and move it away to complete the release
51 { { git reset --soft -q scripts/$cbr &&
52 otop=$(git rev-parse --verify -q HEAD); } ||
53 echo $rel | grep -q -e -rc; } &&
54 { git commit -a -S$key -m "GNU Linux-libre $rel scripts" ||
55 if git status -su | grep .; then
59 case $rup:$(git rev-parse --verify -q HEAD) in
60 *-rc*:* | "$cbr":*) forcetag=: ;;
61 *:"$otop") forcetag=false ;;
65 git tag -m "GNU Linux-libre $rel scripts" -s -u $key \
68 git checkout scripts/$cbr &&
69 git reset --hard scripts/v$rel &&
74 for x in scripts sources logs; do
75 if git rev-parse --verify -q $x/v$rel > /dev/null ; then
76 git tag public/$x/v$rel $x/v$rel &&
81 git worktree remove --force sources/v$rel