Permalink
Browse files

fix processing of more than one specs

  • Loading branch information...
1 parent 248542c commit d0819a33ead287f253b2bbd7d5a84e5065400935 @tuxofil tuxofil committed Oct 25, 2012
Showing with 10 additions and 11 deletions.
  1. +10 −11 yabs.sh
View
21 yabs.sh
@@ -28,17 +28,16 @@ RUNDIR="$1"
[ -z "$RUNDIR" ] && RUNDIR=`pwd`
[ -d "$RUNDIR" ] && cd "$RUNDIR"
-(
- if [ -f "$RUNDIR" ]; then
- echo "$RUNDIR"
- elif [ -f specs.list ]; then
- cat specs.list | \
- grep --invert-match --extended-regexp '^\s*#'
- else
- ls *.spec
- fi
-) | \
-while SPEC=`line`; do
+if [ -f "$RUNDIR" ]; then
+ SPECLIST="$RUNDIR"
+elif [ -f specs.list ]; then
+ SPECLIST=`cat specs.list | \
+ grep --invert-match --extended-regexp '^\s*#'`
+else
+ SPECLIST=`ls *.spec`
+fi
+
+for SPEC in $SPECLIST; do
[ -f "$SPEC" ] || continue
echo -e "\n\n---------------CUT-HERE----------------"
echo -e "--- $SPEC\n\n"

0 comments on commit d0819a3

Please sign in to comment.