Skip to content

Commit

Permalink
Update bits-info.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ale5000-git authored Oct 6, 2024
1 parent ebcafc1 commit 86dba47
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tools/bits-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ readonly SCRIPT_VERSION='0.9'
readonly NL='
'

try { # try takes a block of commands
echo '123'
ls /BAD # it stops at the first failure
ls /lib
} # After try, $? is always 0
if (_error.code !== 0) { # Now check _error
echo 'failed'
}

command 1> /dev/null 2>&1 -v 'local' || {
\eval ' \local() { :; } ' || : # Create a dummy "local" function for ksh shell
alias 'local'='typeset' # On some versions of ksh this really works, but leave the function as dummy fallback
Expand Down

0 comments on commit 86dba47

Please sign in to comment.