Skip to content

Commit

Permalink
fix: get-conduit.sh linux arm64 detection (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
kon14 committed Dec 4, 2022
1 parent 5fd0dad commit 44635af
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions docker/get-conduit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ else
fi

# Detect Architecture
if [[ $uname =~ "arm64" ]]; then
arch="arm64"
if [[ $uname =~ "arm64" ]] || [[ $uname =~ "aarch64" ]]; then
arch="arm"
elif [[ $uname =~ "x86_64" ]]; then
arch="x64"
else
Expand Down Expand Up @@ -48,27 +48,34 @@ chmod a+x ~/.conduit/bin/conduit

# Add To Executable Path
shell_detected='false'
already_installed='false'
if which zsh >> /dev/null 2>&1; then
shell_detected='true'
if ! grep 'export PATH=$PATH:~/.conduit/bin' ~/.zshrc >> /dev/null 2>&1; then
echo "Adding Conduit CLI to Zsh"
printf '\n# Add Conduit CLI to executable PATH\nexport PATH=$PATH:~/.conduit/bin\n' >> ~/.zshrc
else
already_installed='true'
fi
fi
if which bash >> /dev/null 2>&1; then
shell_detected='true'
if ! grep 'export PATH=$PATH:~/.conduit/bin' ~/.bashrc >> /dev/null 2>&1; then
echo "Adding Conduit CLI to Bash"
printf '\n# Add Conduit CLI to executable PATH\nexport PATH=$PATH:~/.conduit/bin\n' >> ~/.bashrc
else
already_installed='true'
fi
fi
if [[ $shell_detected == "false" ]]; then
printf '\nShell auto-detection failed. Could not update executable $PATH.\n';
echo "Conduit CLI located in ~/.conduit/bin/conduit"
elif [[ $already_installed == 'false' ]]; then
printf "\nTo ensure that 'conduit' is available, please open a new terminal window.\n"
fi

# Bootstrap Local Deployment
if [[ $deploy == "true" ]]; then
printf "\n\n"
printf "\n"
~/.conduit/bin/conduit deploy setup --config
fi

0 comments on commit 44635af

Please sign in to comment.