aboutsummaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-11-07 11:04:34 -0700
committerSelene ToyKeeper2023-11-07 11:04:34 -0700
commit96bb6aeb178182c95558c5157b6ddfaecfceb785 (patch)
tree6cd898456b8754e60d39f51d98e55b6cb895a01f /make
parentMerge branch 'pull15' into trunk (diff)
downloadanduril-96bb6aeb178182c95558c5157b6ddfaecfceb785.tar.gz
anduril-96bb6aeb178182c95558c5157b6ddfaecfceb785.tar.bz2
anduril-96bb6aeb178182c95558c5157b6ddfaecfceb785.zip
shell script cleanup (fix lint warnings, remove unused scripts)
Diffstat (limited to 'make')
-rwxr-xr-xmake16
1 files changed, 8 insertions, 8 deletions
diff --git a/make b/make
index a59d1a8..c50219d 100755
--- a/make
+++ b/make
@@ -50,12 +50,12 @@ ENDOFHELP
# sub-command parser / dispatcher
function main() {
case "$MODE" in
- -h|--help|help|/?|/h|/help)
+ -h|--help|help|/\?|/h|/help)
help
;;
clean)
- echo 'rm -vf **/*~ hex/*.hex ui/**/*.elf ui/**/*.o ui/**/*.cpp'
- rm -vf **/*~ hex/*.hex ui/**/*.elf ui/**/*.o ui/**/*.cpp
+ echo 'rm -vf -- **/*~ hex/*.hex ui/**/*.elf ui/**/*.o ui/**/*.cpp'
+ rm -vf -- **/*~ hex/*.hex ui/**/*.elf ui/**/*.o ui/**/*.cpp
;;
dfp)
shift
@@ -76,7 +76,7 @@ function main() {
echo "Not implemented yet."
;;
todo)
- grep -E 'TODO:|FIXME:' **/*.[ch]
+ grep -E 'TODO:|FIXME:' -- **/*.[ch] **/*.md
;;
*)
exec ./bin/build-all.sh "$@"
@@ -86,15 +86,15 @@ function main() {
function make-docs () {
for md in **/*.md ; do
- echo "$md"
- html=$(echo "$md" | sed 's/.md$/.html/')
+ html=${md//.md/.html}
+ echo "$md --> $html"
cmark-gfm "$md" > "$html"
done
}
# go to the repo root
-BASEDIR=$(dirname $0)
-cd "$BASEDIR"
+BASEDIR=$(dirname "$0")
+cd "$BASEDIR" || (echo "Error: Can't cd to basedir." && exit 1)
# do whatever the user requested
main "$@"
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.