Skip to content

Commit

Permalink
use bash extension for more visibility
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Gatto <[email protected]>
  • Loading branch information
outscale-mgo committed Oct 22, 2024
1 parent d43c7a2 commit b775805
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cognac_gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ EOF
done
aditional=$(json-search -n additionalProperties <<< $componant)

if [ "$aditional" == "null" -o "$aditional" == "false" ]; then
if [[ "$aditional" == "null" || "$aditional" == "false" ]]; then
cat <<EOF
{
fprintf(stderr, "'%s' not an argumemt of '$s'\n", str);
Expand Down
2 changes: 1 addition & 1 deletion construct_data.c.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fi

aditional=$(json-search -n additionalProperties <<< $base)

if [ "$aditional" != "null" -a "$aditional" != "false" ]; then
if [[ "$aditional" != "null" && "$aditional" != "false" ]]; then
# no type checks are made here, the additional stuff is assumed to be a string
cat <<EOF
struct additional_strings **elems = args->additional_strs;
Expand Down
2 changes: 1 addition & 1 deletion mk_args.c.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ write_struct() {
done
aditional=$(json-search -n additionalProperties <<< $st_info)

if [ "$aditional" != "null" -a "$aditional" != "false" ]; then
if [[ "$aditional" != "null" && "$aditional" != "false" ]]; then
# no type checks are made here, the additional stuff is assumed to be a string
echo -e '\tstruct additional_strings **additional_strs;'
fi
Expand Down

0 comments on commit b775805

Please sign in to comment.