openim-sdk-cpp/bootstrap_install_mage.sh
Monet Lee 95956f738e
feat: add change_input_states and get_input_states, and add login and logout alternative func. (#54)
* update sdk version to v3.8.1-rc.17

* upgrade sdk version to v3.8.1-rc.19.

* upgrade sdk version to v3.8.1-rc.21.

* update interface name.

* update sdk version to v3.8.1-rc.22

* feat: update sdk version to 3.8.1

* feat: add `change_input_states` and `get_input_states`, and add login and logout alternative func.
2024-10-12 12:05:29 +08:00

22 lines
578 B
Bash
Executable File

#!/bin/bash
if [[ ":$PATH:" == *":$HOME/.local/bin:"* ]]; then
TARGET_DIR="$HOME/.local/bin"
else
TARGET_DIR="/usr/local/bin"
echo "Using /usr/local/bin as the installation directory. Might require sudo permissions."
fi
if ! command -v mage &> /dev/null; then
echo "Installing Mage to $TARGET_DIR ..."
GOBIN=$TARGET_DIR go install github.com/magefile/mage@latest
fi
if ! command -v mage &> /dev/null; then
echo "Mage installation failed."
echo "Please ensure that $TARGET_DIR is in your \$PATH."
exit 1
fi
echo "Mage installed successfully."