summaryrefslogtreecommitdiff
path: root/Biz/Dragons
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2024-04-01 15:19:49 -0400
committerBen Sima <ben@bsima.me>2024-04-01 15:19:49 -0400
commit2d40ec3a03f4684f6fabba7dee2981c992a13785 (patch)
tree1edc1522fd5eb8e6d20b1b4dbde89f3e49ad9e51 /Biz/Dragons
parentdb373a8c727cad91d375b40a6c70b11ed73bdafb (diff)
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.
Diffstat (limited to 'Biz/Dragons')
-rw-r--r--Biz/Dragons/env.sh (renamed from Biz/Dragons/env.bash)1
-rwxr-xr-xBiz/Dragons/get-examples.sh8
2 files changed, 5 insertions, 4 deletions
diff --git a/Biz/Dragons/env.bash b/Biz/Dragons/env.sh
index 86a2f69..2bc4fbb 100644
--- a/Biz/Dragons/env.bash
+++ b/Biz/Dragons/env.sh
@@ -1,3 +1,4 @@
+# shellcheck disable=all
# This is an example env file for Dragons.dev. Copy this to /run/dragons/env and
# fill in the values.
#
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) <cookie>"
+ echo "usage: $(basename "$0") <cookie>"
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