Skip to content

Commit

Permalink
Fix build on systems where sh is not bash
Browse files Browse the repository at this point in the history
When invoking `make` to build flyctl, I got the following error:

scripts/generate_docs.sh: 6: [[: not found

It looks like `scripts/generate_docs.sh` expects to run with bash, but the
Makefile invokes it using `sh scripts/generate_docs.sh`. Change the
Makefile to use `bash`, and also add a bash shebang to the script.
  • Loading branch information
joshtriplett committed Jun 26, 2020
1 parent 37a470d commit db3c1f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ build: generate

cmddocs: generate
@echo Running Docs Generation
sh scripts/generate_docs.sh
bash scripts/generate_docs.sh
3 changes: 2 additions & 1 deletion scripts/generate_docs.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
echo "Running doc/main.go"
go run doc/main.go

Expand All @@ -12,4 +13,4 @@ if [ "$1" ]
then
echo "rsync to $1"
rsync out/ $1 --delete -r -v
fi
fi

0 comments on commit db3c1f5

Please sign in to comment.