Skip to content

chore: add binary#276

Open
yashsa wants to merge 4 commits into
2.x.xfrom
chore/add-binary
Open

chore: add binary#276
yashsa wants to merge 4 commits into
2.x.xfrom
chore/add-binary

Conversation

@yashsa

@yashsa yashsa commented Jan 22, 2025

Copy link
Copy Markdown

Odin version(x.y.z)

Features

Resources

Comment thread migrate-odin.sh
fi

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

Copy link
Copy Markdown
Contributor

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

Comment thread migrate-odin.sh
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
Copy Markdown
Contributor

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

Comment thread migrate-odin.sh
sudo mv /opt/homebrew/bin/odin /opt/homebrew/bin/old-odin
fi

sudo mv ./odin /usr/local/bin/

Copy link
Copy Markdown
Contributor

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

Comment thread migrate-odin.sh
@@ -0,0 +1,130 @@
#!/bin/bash
set -e

Copy link
Copy Markdown
Contributor

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

Yash Saxena and others added 3 commits February 7, 2025 11:37
Signed-off-by: surajgour-d11 <suraj.gour@dream11.com>
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.

2 participants