]> git.pld-linux.org Git - packages/cross-binutils.git/commitdiff
simplify check of no targets selected
authorElan Ruusamäe <glen@delfi.ee>
Sat, 10 Jan 2015 22:19:59 +0000 (00:19 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Sat, 10 Jan 2015 22:19:59 +0000 (00:19 +0200)
cross-binutils.spec

index 6760ac4671c93897546e2c631211618d11a84f3c..c0481fe2d5db594f3f40ca89744d2376c390e1ac 100644 (file)
@@ -233,17 +233,17 @@ for tool in binutils gas ld; do
        sed -i -e "s/^DEJATOOL = .*/DEJATOOL = $tool/" $tool/Makefile.in
 done
 touch */configure
+cd ..
 
 prep_target() {
     target=$1
     cond=$2
 
     if [ $cond != 0 ]; then
-               echo $1 >&5
+               echo $1
     fi
 }
 
-cd ..
 (
        prep_target alpha-linux-gnu             %{build_alpha}
        prep_target arm-linux-gnu               %{build_arm}
@@ -282,14 +282,9 @@ cd ..
        prep_target unicore32-linux-gnu %{build_unicore32}
        prep_target x86_64-linux-gnu    %{build_x86_64}
        prep_target xtensa-linux-gnu    %{build_xtensa}
-) 5>target.list
+) >target.list
 
-n=0
-for target in $(cat target.list); do
-       n=1
-       break
-done
-if [ $n = 0 ]; then
+if [ $(cat target.list | wc -l) = 0 ]; then
        echo >&2 "No targets selected"
        exit 8
 fi
@@ -399,7 +394,7 @@ for target in $(cat target.list); do
 done
 
 # for documentation purposes only
-mkdir %{cross}-binutils
+install -d %{cross}-binutils
 cd %{cross}-binutils
 ../%{srcdir}/configure \
        --disable-dependency-tracking \
This page took 0.067919 seconds and 4 git commands to generate.