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

fix ioctl update failed on mac #3957

Merged
merged 6 commits into from
Nov 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions install-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ BREW_UPDATE_CMD="brew update"
BREW_INSTALL_CMD="brew install ioctl"
BREW_REINSTALL_CMD="brew reinstall ioctl"
BREW_UNSTABLE_TAP_CMD="brew tap iotexproject/ioctl-unstable"
BREW_UNSTABLE_INSTALL_CMD="brew install --HEAD iotexproject/ioctl-unstable/ioctl-unstable"
BREW_UNSTABLE_INSTALL_CMD="brew install iotexproject/ioctl-unstable/ioctl-unstable"
BREW_UNSTABLE_REINSTALL_CMD="brew reinstall ioctl-unstable"
BREW_INSTALLED_PATH="/usr/local/bin"

Expand Down Expand Up @@ -124,25 +124,18 @@ fi
if [ "${OS}" = "darwin" ];then
if test -x "$(command -v brew)"; then
if [ "$1" = "unstable" ]; then
if [ `command -v ioctl` ]; then
rm -f $BREW_INSTALLED_PATH/ioctl
fi

if [ `command -v ioctl-unstable` ]; then
$BREW_UNSTABLE_REINSTALL_CMD
else
$BREW_UNSTABLE_TAP_CMD && $BREW_UNSTABLE_INSTALL_CMD
fi
ln -s $BREW_INSTALLED_PATH/ioctl-unstable $BREW_INSTALLED_PATH/ioctl
echo "Command-line tools is installed to `command -v ioctl-unstable`"
else
if [ `command -v ioctl` ]; then
rm -f $BREW_INSTALLED_PATH/ioctl
$BREW_UPDATE_CMD && $BREW_REINSTALL_CMD
else
$BREW_UPDATE_CMD && $BREW_INSTALL_CMD
fi

echo "Command-line tools is installed to `command -v ioctl`"
fi
exit 0
Expand Down
Loading