-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: 2.x.x
Are you sure you want to change the base?
chore: add binary #276
Conversation
fi | ||
|
||
# Backup existing configuration if it exists | ||
if [ -f ~/.odin/config ]; then |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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/ |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
Signed-off-by: surajgour-d11 <[email protected]>
2ffca40
to
187743b
Compare
Odin version(x.y.z)
Features
Resources