Skip to content

Commit

Permalink
Add a basic install script (#45)
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
  • Loading branch information
jviotti authored Jun 3, 2024
1 parent c86a632 commit 50464aa
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ noa_target_clang_format(SOURCES
noa_target_clang_tidy(SOURCES
src/*.h src/*.cc)
noa_target_shellcheck(SOURCES
test/*.sh)
test/*.sh install)

# Testing
if(JSONSCHEMA_TESTS)
Expand Down
6 changes: 6 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ powerful [JSON Toolkit](https://github.com/sourcemeta/jsontoolkit) library.
brew install intelligence-ai/apps/jsonschema
```

### Using the install script helper

```sh
/bin/sh -c "$(curl -fsSL https://raw.githubusercontent.com/intelligence-ai/jsonschema/main/install -H "Cache-Control: no-cache, no-store, must-revalidate")"
```

### From GitHub Releases

We publish precompiled binaries for every supported platforms to [GitHub
Expand Down
17 changes: 17 additions & 0 deletions install
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

set -o errexit
set -o nounset

UNAME="$(uname)"

if [ "$UNAME" = "Darwin" ]
then
echo "---- Attempting to install the JSON Schema CLI using Homebrew" 1>&2
brew install intelligence-ai/apps/jsonschema
exit 0
fi

echo "ERROR: I don't know how to install the JSON Schema CLI in $UNAME!" 1>&2
echo "Open an issue here: https://github.com/Intelligence-AI/jsonschema/issues" 1>&2
exit 1

0 comments on commit 50464aa

Please sign in to comment.