mturk / rpms / httpd

Forked from rpms/httpd 3 years ago
Clone
0ba3e33
#!/bin/sh
0ba3e33
echo ''
0ba3e33
echo '<patches>'
0ba3e33
for f in $*; do
305e86b
  n=${f//httpd-2\.[0-9]\.[0-9][0-9]-/}
0ba3e33
  n=${n//.patch/}
0ba3e33
  s_HEAD=`grep ^Upstream-HEAD $f | sed 's/Upstream-HEAD: //'`
0ba3e33
  s_20=`grep ^Upstream-2.0: $f | sed 's/Upstream-2.0: //'`
0ba3e33
  s_Com=`grep ^Upstream-Status: $f | sed 's/Upstream-Status: //'`
2bc479e
  s_PR=`grep ^Upstream-PR: $f | sed 's/Upstream-PR: //'`
2bc479e
  printf ' <patch name="%s">\n' $n
2bc479e
  printf '  <status branch="HEAD">%s</status>\n' "$s_HEAD"
2bc479e
  printf '  <status branch="2.0">%s</status>\n' "$s_20"
2bc479e
  printf '  <comment>%s</comment>\n' "$s_Com"
2bc479e
  if [ -n "$s_PR" ]; then
2bc479e
    printf '  <bug pr="%s"/>\n' "$s_PR"
2bc479e
  fi
2bc479e
  printf ' </patch>\n'
0ba3e33
done
0ba3e33
echo '</patches>'