On Sat, Mar 13, 2010 at 5:46 AM, Pierre Schmitz <pierre@archlinux.de> wrote:
Am Montag, 8. Februar 2010 16:13:44 schrieb Eric Bélanger:
- if ! /usr/bin/svn export -q --force "$SVNREPO/$packagename" "$packagename" >/dev/null 2>&1 ; then + if ! $(/usr/bin/svn export -q --force "$SVNREPO/$packagename" "$packagename" >/dev/null 2>&1) \ + && ! $(/usr/bin/svn export -q --force "$SVNREPOCOMMUNITY/$packagename" "$packagename" >/dev/null 2>&1) ; then
I think replacing "if command" with "if $(command)" is probably not what you want as you are no longer checking the return value but the output. Or I am just wrong here?
I'm not a bash expert but it seem to be doing the same thing: $ if ! ls >/dev/null 2>&1 ;then echo fail; fi $ if ! $(ls >/dev/null 2>&1) ;then echo fail; fi $ if ! foo >/dev/null 2>&1 ;then echo fail; fi fail $ if ! $(foo >/dev/null 2>&1) ;then echo fail; fi fail
--
Pierre Schmitz, https://users.archlinux.de/~pierre