Skip to content

Commit

Permalink
Restyled by shfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits committed Jul 13, 2020
1 parent bd4dcaa commit 9769066
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,26 @@

OS="$(uname)"
case "$OS" in
'Linux')
OS='linux'
SED_IFLAG=(-i'')
;;
'Darwin')
OS='macos'
SED_IFLAG=(-i '')
;;
*)
echo "Operating system '$OS' not supported."
exit 1
;;
'Linux')
OS='linux'
SED_IFLAG=(-i'')
;;
'Darwin')
OS='macos'
SED_IFLAG=(-i '')
;;
*)
echo "Operating system '$OS' not supported."
exit 1
;;
esac

OUTPUT_FILE=api.json

# Bundle yaml
swagger-cli bundle api.yaml -o "$OUTPUT_FILE";
swagger-cli bundle api.yaml -o "$OUTPUT_FILE"

# Remove newlines from descriptions
sed "${SED_IFLAG[@]}" 's/\\n\\n/\\n/g' "$OUTPUT_FILE";
sed "${SED_IFLAG[@]}" 's/\\n/ /g' "$OUTPUT_FILE";
sed "${SED_IFLAG[@]}" 's/ "/"/g' "$OUTPUT_FILE";
sed "${SED_IFLAG[@]}" 's/\\n\\n/\\n/g' "$OUTPUT_FILE"
sed "${SED_IFLAG[@]}" 's/\\n/ /g' "$OUTPUT_FILE"
sed "${SED_IFLAG[@]}" 's/ "/"/g' "$OUTPUT_FILE"

0 comments on commit 9769066

Please sign in to comment.