Skip to content

Commit

Permalink
chore: write simple installation script (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivansantiagojr authored Aug 30, 2024
1 parent 25da26e commit 86ab052
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ Zig references I used:

# Installation

I promise that I will write an installation tutorial... maybe (feel free to help with that with a PR).
For now, you can install from our pre-built binary (Linux only):

```sh
curl -sSL https://raw.githubusercontent.com/brasilisclub/zignr/install-script/install.sh | bash -
```

> To make `zignr` available globally you should have `~/.local/bin` on you `PATH`
# Usage

Expand Down
30 changes: 30 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

binary_url="https://github.com/ivansantiagojr/zignr/releases/download/v0.1.1/binary-0.1.1-x86_64-linux"
binary_name="zignr"

echo "Downloading zignr..."
wget -q "$binary_url" -O "$binary_name"

if [ $? -ne 0 ]; then
echo "Failed to download zignr."
exit 1
fi

echo "Making zignr executable..."
chmod +x "$binary_name"

echo "Moving zignr to ~/.local/bin..."
mv "$binary_name" "$HOME/.local/bin/$binary_name"

# Verify installation
if [ $? -eq 0 ]; then
echo "zignr installed successfully!"
else
echo "Failed to move zignr to ~/.local/bin. You might need sudo privileges."
exit 1
fi

echo
echo "add ~/.local/bin to you PATH so you can run zignr from anywhere"
echo "then use run zignr"

0 comments on commit 86ab052

Please sign in to comment.