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 21, 2024
1 parent f9d6135 commit f1a5c8c
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tools/bits-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@
SCRIPT_NAME='Bits info'
SCRIPT_VERSION='1.5.4'

echo '==='
result=0
if false; then
result=1
elif true && false; then
result=2
else
result=3
fi
echo "Result: ${result}"
echo '==='

### CONFIGURATION ###

set -u 2> /dev/null || :
Expand All @@ -24,18 +36,6 @@ case "$(set 2> /dev/null -o || set || :)" in *'pipefail'*) set -o pipefail || pr
type "${@}"
}

echo '==='
result=0
if test '' = 'no'; then
result=1
elif command -v test && false; then
result=2
else
result=3
fi
echo "Result: ${result}"
echo '==='

# For "zsh" shell
if command 1> /dev/null 2>&1 -v 'setopt'; then
setopt SH_WORD_SPLIT || printf 1>&2 '%s\n' 'Failed: setopt'
Expand Down

0 comments on commit f1a5c8c

Please sign in to comment.