[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ltib] base_libs bash/dash if test
From: |
Mike Goins |
Subject: |
[Ltib] base_libs bash/dash if test |
Date: |
Wed, 12 Sep 2012 13:49:02 -0400 |
I was having a problem with base_libs and possibly found a problem
with this test in base_libs.spec:
${TOOLCHAIN_PREFIX}gcc -v 2>&1 | grep -q "prefix=/usr"
if (( $? ))
then
so I wrote a test script:
$ cat tst
#!/bin/sh
if (( 1 )); then echo OK; fi
$ bash -x ./tst
+ (( 1 ))
+ echo OK
OK
$ dash -x ./tst
+ 1
./tst: 3: ./tst: 1: not found
Assuming I am right as I am not as familiar with dash as bash, how about?
if [ $? -eq 1 ]; then
Thanks
- [Ltib] base_libs bash/dash if test,
Mike Goins <=