From 2d40ec3a03f4684f6fabba7dee2981c992a13785 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 1 Apr 2024 15:19:49 -0400 Subject: Rename .bash files to .sh I was already using .sh to refer to shell scripts. When I added .bash, I didn't realize that the linter was set to act on .sh files and not .bash files, so all of these bash scripts escaped the linter. This commit renames them to .sh, removes the .bash extension support from Biz.Namespace, and fixes all the reported shellcheck errors. --- Biz/Dragons/env.bash | 9 --------- Biz/Dragons/env.sh | 10 ++++++++++ Biz/Dragons/get-examples.sh | 8 ++++---- 3 files changed, 14 insertions(+), 13 deletions(-) delete mode 100644 Biz/Dragons/env.bash create mode 100644 Biz/Dragons/env.sh (limited to 'Biz/Dragons') diff --git a/Biz/Dragons/env.bash b/Biz/Dragons/env.bash deleted file mode 100644 index 86a2f69..0000000 --- a/Biz/Dragons/env.bash +++ /dev/null @@ -1,9 +0,0 @@ -# This is an example env file for Dragons.dev. Copy this to /run/dragons/env and -# fill in the values. -# -# These can be retrieved from https://github.com/settings/applications/1428824 -GITHUB_CLIENT_SECRET= -GITHUB_CLIENT_ID= -# -# This is just a UUID, can be grabbed from /proc/sys/kernel/random/uuid -GITHUB_CLIENT_STATE= diff --git a/Biz/Dragons/env.sh b/Biz/Dragons/env.sh new file mode 100644 index 0000000..2bc4fbb --- /dev/null +++ b/Biz/Dragons/env.sh @@ -0,0 +1,10 @@ +# shellcheck disable=all +# This is an example env file for Dragons.dev. Copy this to /run/dragons/env and +# fill in the values. +# +# These can be retrieved from https://github.com/settings/applications/1428824 +GITHUB_CLIENT_SECRET= +GITHUB_CLIENT_ID= +# +# This is just a UUID, can be grabbed from /proc/sys/kernel/random/uuid +GITHUB_CLIENT_STATE= diff --git a/Biz/Dragons/get-examples.sh b/Biz/Dragons/get-examples.sh index c7e4bc7..d488fe9 100755 --- a/Biz/Dragons/get-examples.sh +++ b/Biz/Dragons/get-examples.sh @@ -3,20 +3,20 @@ ## if [ "$#" == "0" ] then - echo "usage: $(basename $0) " + echo "usage: $(basename "$0") " echo "copy the cookie from the browser dev console" exit 1 else cookie="$1" - curl 'https://dragons.dev/analysis' \ + if curl 'https://dragons.dev/analysis' \ -d "owner=github&repo=training-kit" \ -X POST \ -H 'Content-Type: application/x-www-form-urlencoded' \ -H "Cookie: JWT-Cookie=$cookie" \ --silent \ --compressed - if [[ $? -eq 0 ]]; then - echo done + then + echo okay exit 0 else echo error -- cgit v1.2.3