-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: write simple installation script (#2)
- Loading branch information
1 parent
25da26e
commit 86ab052
Showing
2 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |