Lines Matching +full:post +full:-
6 GIT=${GIT:-git}
7 PAGER=${PAGER:-${LESS:-${MORE:-more}}}
16 [ $# -eq 1 ] || Error "Cd() takes a single parameter."
28 --) shift; break;;
29 -a) TARBALL=$2; shift 2;;
30 -d) RM=echo; shift;;
31 -n) ECHO=echo; shift;;
32 -P) PR=$2; shift 2;;
33 -r) REVIEWER=$2; shift 2;;
34 -u) url=$2; shift 2;;
35 -h) echo "Usage:";
36 echo " "$0 '[-ahnPr] [TARBALL=] [PR=] [REVIEWER=]'
37 echo " "$0 '-a <filename> # (a)rchive'
38 echo " "$0 '-h # print usage'
39 echo " "$0 '-n # do not import, check only.'
40 echo " "$0 '-P <PR Number> # Use PR'
41 echo " "$0 '-r <reviewer(s) list> # (r)eviewed by'
48 return $(($_shift - $#))
58 test -s ${TARBALL:-/dev/null} || Error need TARBALL
60 SB=${SB:-`dirname $here`}
71 rm -f *~
72 mkdir -p $SB/tmp
77 # but we need to take care dealing with re-ordering
78 (${GIT} diff FILES | sed -n '/^[+-][^+-]/p'; \
79 ${GIT} diff mk/FILES | sed -n '/^[+-][^+-]/s,.,&mk/,p' ) > $TF.diffs
81 grep '^-' $TF.diffs | sed 's,^.,,' | sort > $TF.rms
82 comm -13 $TF.adds $TF.rms > $TF.rm
84 post=$SB/tmp/bmake-post.sh
86 # this is similar to what generates the mail to bmake-announce
88 echo Import bmake-$VERSION
91 if [ -s $post ]; then
92 last=`sed -n '/ tag/s,.*/,bmake-,p' $post`
99 $GIT diff --staged $C |
100 sed -n '/^@@/d;/^\+\+\+/d;/^\+/s,^.,,p' > $TF.C
101 test -s $TF.C || continue
109 if [ -z "$ECHO" ]; then
110 test -s $TF.rm && xargs rm -f < $TF.rm
111 $GIT add -A
112 gen_import_F > $SB/tmp/bmake-import.F
113 $GIT diff --staged > $SB/tmp/bmake-import.diff
114 $PAGER $SB/tmp/bmake-import.F $SB/tmp/bmake-import.diff
115 { echo "$GIT tag -a -m \"Tag bmake/$VERSION\" vendor/NetBSD/bmake/$VERSION"
116 echo "echo \"When ready do: $GIT push --follow-tags\""
117 } > $post
118 echo "Edit $SB/tmp/bmake-import.F as needed, then:"
119 echo "$GIT commit -F $SB/tmp/bmake-import.F"
120 echo "After you commit, run $post"
122 comm -23 $TF.adds $TF.rms > $TF.add
123 test -s $TF.rm && { echo Removing:; cat $TF.rm; }
124 test -s $TF.add && { echo Adding:; cat $TF.add; }
127 ${RM:-rm} -f $TF.*