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

chore: write simple installation script #2

Merged
merged 2 commits into from
Aug 30, 2024
Merged
Changes from 1 commit
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
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"
Loading