Ignore empty/commented series lines
[gq.git] / gq-header
blob87847972ad0dbcaf0c1ef1456b3727f0029183fb
1 #!/bin/bash
3 # Copyright (c) Josef "Jeff" Sipek, 2006
6 source "`dirname $0`/gq.lib"
8 patch="$1"
10 if [ -z "$patch" ]; then
11 # use the patch that's on the top of the stack
13 eidx=`wc -l < $applied`
14 if [ $eidx -eq 0 ]; then
15 echo "Status file is empty"
16 exit 1
18 else
19 # use the specified patch
21 eidx=`get_series | grep -ne "^$patch\$" | cut -d: -f1`
22 if [ $eidx -eq 0 ]; then
23 echo "Patch $patch is not in the series"
24 exit 1
28 idx=0
29 for p in `get_series`; do
30 idx=`expr $idx + 1`
31 [ $idx -lt $eidx ] && continue
32 [ $idx -gt $eidx ] && break
34 do_get_header $GQ_DIR/$branch/$p
35 done