Skip to content

Commit

Permalink
add first_run directive and script
Browse files Browse the repository at this point in the history
  • Loading branch information
maximpertsov committed Oct 15, 2024
1 parent a8eda63 commit eecd430
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ wifi: *.go */*.go go.*
go build -o $@ -ldflags "-s -w" -tags osusergo,netgo
file $@

module.tar.gz: wifi
module.tar.gz: wifi first_run.sh
# the bundled module
rm -f $@
tar czf $@ $^
9 changes: 9 additions & 0 deletions first_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

if [[ -n "$VIAM_TEST_FAIL_RUN_FIRST" ]]; then
exit 1
fi

echo "first_run script ran successfully"

exit 0
3 changes: 2 additions & 1 deletion meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
"arch" : ["linux/amd64", "linux/arm64", "darwin/arm64"],
"darwin_deps": ["go"]
},
"entrypoint": "wifi"
"entrypoint": "wifi",
"first_run": "first_run.sh"
}

0 comments on commit eecd430

Please sign in to comment.