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: add binary #276

Open
wants to merge 4 commits into
base: 2.x.x
Choose a base branch
from
Open

chore: add binary #276

wants to merge 4 commits into from

Conversation

yash-saxena-d11
Copy link
Collaborator

Odin version(x.y.z)

Features

Resources

fi

# Backup existing configuration if it exists
if [ -f ~/.odin/config ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Execute touch ~/.odin/config.toml to avoid creating config backup etc. If config.toml exists then new odin will read/write from this file and old odin will continue using config

echo "Downloaded the odin binary successfully."


if [ -f /usr/local/bin/odin ] && [ ! -f /usr/local/bin/old-odin ] && [ ! -f /opt/homebrew/bin/old-odin ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use which odin to get existing location of odin binary instead of assuming /usr/local/bin/odin and opt/homebrew/bin/odin

sudo mv /opt/homebrew/bin/odin /opt/homebrew/bin/old-odin
fi

sudo mv ./odin /usr/local/bin/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move new odin also to same path as existing odin

@@ -0,0 +1,130 @@
#!/bin/bash
set -e
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to remove -e, enabling this will exit the script on errors due to which

if [ $? -ne 0 ]; then

becomes meaningless

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants