mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-27 05:52:29 +08:00
73 lines
2.7 KiB
Bash
73 lines
2.7 KiB
Bash
#!/bin/bash
|
|
|
|
# --------------------------------------------------------------
|
|
# OpenIM Protoc Tool v1.0.0
|
|
# --------------------------------------------------------------
|
|
# OpenIM has released its custom Protoc tool version v1.0.0.
|
|
# This tool is customized to meet the specific needs of OpenIM and resides in its separate repository.
|
|
# It can be downloaded from the following link:
|
|
# https://github.com/OpenIMSDK/Open-IM-Protoc/releases/tag/v1.0.0
|
|
#
|
|
# Download link (Windows): https://github.com/OpenIMSDK/Open-IM-Protoc/releases/download/v1.0.0/windows.zip
|
|
# Download link (Linux): https://github.com/OpenIMSDK/Open-IM-Protoc/releases/download/v1.0.0/linux.zip
|
|
#
|
|
# Installation steps (taking Windows as an example):
|
|
# 1. Visit the above link and download the version suitable for Windows.
|
|
# 2. Extract the downloaded file.
|
|
# 3. Add the extracted tool to your PATH environment variable so that it can be run directly from the command line.
|
|
#
|
|
# Note: The specific installation and usage instructions may vary based on the tool's actual implementation. It's advised to refer to official documentation.
|
|
# --------------------------------------------------------------
|
|
|
|
function help_message {
|
|
echo "Usage: ./install-protobuf.sh [option]"
|
|
echo "Options:"
|
|
echo "-i, --install Install the OpenIM Protoc tool."
|
|
echo "-u, --uninstall Uninstall the OpenIM Protoc tool."
|
|
echo "-r, --reinstall Reinstall the OpenIM Protoc tool."
|
|
echo "-c, --check Check if the OpenIM Protoc tool is installed."
|
|
echo "-h, --help Display this help message."
|
|
}
|
|
|
|
function install_protobuf {
|
|
echo "Installing OpenIM Protoc tool..."
|
|
# Logic for installation based on the OS
|
|
# e.g., download, unzip, and add to PATH
|
|
}
|
|
|
|
function uninstall_protobuf {
|
|
echo "Uninstalling OpenIM Protoc tool..."
|
|
# Logic for uninstallation
|
|
# e.g., remove from PATH and delete files
|
|
}
|
|
|
|
function reinstall_protobuf {
|
|
echo "Reinstalling OpenIM Protoc tool..."
|
|
uninstall_protobuf
|
|
install_protobuf
|
|
}
|
|
|
|
function check_protobuf {
|
|
echo "Checking for OpenIM Protoc tool installation..."
|
|
# Logic to check if the tool is installed
|
|
# e.g., which protoc or checking PATH
|
|
}
|
|
|
|
while [ "$1" != "" ]; do
|
|
case $1 in
|
|
-i | --install ) install_protobuf
|
|
;;
|
|
-u | --uninstall ) uninstall_protobuf
|
|
;;
|
|
-r | --reinstall ) reinstall_protobuf
|
|
;;
|
|
-c | --check ) check_protobuf
|
|
;;
|
|
-h | --help ) help_message
|
|
exit
|
|
;;
|
|
* ) help_message
|
|
exit 1
|
|
esac
|
|
shift
|
|
done |