Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add install script #152

Merged
merged 1 commit into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions install/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

RDFLINT_LIB_DIR=$HOME/.local/share/rdflint
RDFLINT_BIN_DIR=$HOME/.local/bin

RDFLINT_VERSION=$(curl -s https://jitpack.io/api/builds/com.github.imas/rdflint/latestOk | jq -r .version)
DOWNLOAD_URL=https://jitpack.io/com/github/imas/rdflint/${RDFLINT_VERSION}/rdflint-${RDFLINT_VERSION}.jar

mkdir -p $RDFLINT_LIB_DIR
mkdir -p $RDFLINT_BIN_DIR
curl -s $DOWNLOAD_URL -o $RDFLINT_LIB_DIR/rdflint-${RDFLINT_VERSION}.jar

echo "#!/bin/sh
exec java -jar ${RDFLINT_LIB_DIR}/rdflint-${RDFLINT_VERSION}.jar \"\$@\"
" > ${RDFLINT_BIN_DIR}/rdflint
chmod +x ${RDFLINT_BIN_DIR}/rdflint
12 changes: 12 additions & 0 deletions install/uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

RDFLINT_LIB_DIR=$HOME/.local/share/rdflint
RDFLINT_BIN_DIR=$HOME/.local/bin

rm -f $RDFLINT_BIN_DIR/rdflint
if [ -d $RDFLINT_LIB_DIR ]; then
for f in $(find ${RDFLINT_LIB_DIR} -name rdflint-*.jar); do
rm $f
done
rmdir $RDFLINT_LIB_DIR
fi
Loading