Skip to main content
added 1 character in body
Source Link
terdon
  • 252.7k
  • 69
  • 481
  • 719

The following line on a bash script:

$GEN_SDK $GEN_SDK_FLAGS $OUT_DIR/toolchain || panic "Cannot generate SDK toolchain!"

is panicking when executed. I believe the loginlogic on this line is that if the first command runs okOK, then the second one is not evaluated. But what does it mean for the first command to run okOK? There sThere's no such thing as return true in bash. So how does it know it didntdidn't run okOK?

The following line on a bash script:

$GEN_SDK $GEN_SDK_FLAGS $OUT_DIR/toolchain || panic "Cannot generate SDK toolchain!"

is panicking when executed. I believe the login on this line is that if the first command runs ok, then the second one is not evaluated. But what does it mean for the first command to run ok? There s no such thing as return true in bash. So how does it know it didnt run ok?

The following line on a bash script:

$GEN_SDK $GEN_SDK_FLAGS $OUT_DIR/toolchain || panic "Cannot generate SDK toolchain!"

is panicking when executed. I believe the logic on this line is that if the first command runs OK, then the second one is not evaluated. But what does it mean for the first command to run OK? There's no such thing as return true in bash. So how does it know it didn't run OK?

Source Link

What does some_script.sh || "message" means in a bash script?

The following line on a bash script:

$GEN_SDK $GEN_SDK_FLAGS $OUT_DIR/toolchain || panic "Cannot generate SDK toolchain!"

is panicking when executed. I believe the login on this line is that if the first command runs ok, then the second one is not evaluated. But what does it mean for the first command to run ok? There s no such thing as return true in bash. So how does it know it didnt run ok?