forked from DataLinkDC/dinky
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
210 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
EXTERNAL_CONNECTIVITY_CHECK_URL="www.baidu.com" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
DINKY_HOME_PARAMS=$1 | ||
ENV_FILE=$2 | ||
|
||
|
||
echo -e "${GREEN}Start configuring DINKY_HOME environment variable...${RESET}" | ||
|
||
echo -e "${GREEN}DINKY_HOME environment variable has not been configured, please choose whether to configure.${RESET}" | ||
echo -e "${GREEN}1. Use the automatically obtained DINKY_HOME environment variable${RESET}" | ||
echo -e "${GREEN}2. Manually enter the path of DINKY_HOME${RESET}" | ||
echo -e "${GREEN}3. Cancel configuration${RESET}" | ||
while true; do | ||
read -p "Please enter your choice(1/2/3):" DINKY_HOME_CHOICE | ||
case $DINKY_HOME_CHOICE in | ||
1) | ||
echo -e "${GREEN}Use the automatically obtained DINKY_HOME environment variable${RESET}" | ||
echo -e "${GREEN} The currently obtained path is: $DINKY_HOME_PARAMS to perform automatic configuration${RESET}" | ||
add_to_env "DINKY_HOME" "$DINKY_HOME_PARAMS" "$ENV_FILE" | ||
add_to_env "PATH" "\$DINKY_HOME/bin" "$ENV_FILE" | ||
sleep 2 | ||
source $ENV_FILE | ||
echo -e "${GREEN}DINKY_HOME environment variable configuration completed. Please confirm whether the following configuration is correct:${RESET}" | ||
grep -E '^(export DINKY_HOME)' $ENV_FILE | grep -v "^#" | grep -v "^$" | ||
break | ||
;; | ||
2) | ||
read -p "Please enter the path of DINKY_HOME:" dinky_home_path | ||
dinky_home_path=$(echo "$dinky_home_path" | tr -d '[:space:]') | ||
if [ ! -d "$dinky_home_path" ]; then | ||
echo -e "${RED}The path does not exist, please re-enter${RESET}" | ||
read -p "Please enter the path of DINKY_HOME:" dinky_home_path | ||
else | ||
echo -e "${GREEN}The path you entered is: $dinky_home_path${RESET}" | ||
add_to_env "DINKY_HOME" "$dinky_home_path" "$ENV_FILE" | ||
add_to_env "PATH" "\$DINKY_HOME/bin" "$ENV_FILE" | ||
sleep 2 | ||
source $ENV_FILE | ||
echo -e "${GREEN}DINKY_HOME environment variable configuration completed. Please confirm whether the following configuration is correct:${RESET}" | ||
grep -E '^(export DINKY_HOME)' $ENV_FILE | grep -v "^#" | grep -v "^$" | ||
fi | ||
break | ||
;; | ||
3) | ||
echo -e "${GREEN}Cancel configuration${RESET}" | ||
break | ||
;; | ||
*) | ||
echo -e "${RED}Invalid input, please re-run the script to select the correct option.${RESET}" | ||
;; | ||
esac | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
CURRENT_FLINK_FULL_VERSION=$1 | ||
FLINK_VERSION_SCAN=$2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
DINKY_LIB_DIR=$1 | ||
|
||
echo -e "${GREEN}Start downloading the mysql driver package...${RESET}" | ||
if [ -f "${DINKY_LIB_DIR}/mysql-connector-j-8.4.0.jar" ]; then | ||
echo -e "${YELLOW}mysql The driver package already exists, no need to download it again. Skip this step。${RESET}" | ||
else | ||
download_file https://repo1.maven.org/maven2/com/mysql/mysql-connector-j/8.4.0/mysql-connector-j-8.4.0.jar "${DINKY_LIB}" | ||
echo -e "${GREEN}Download is complete, please verify. The downloaded file storage address is: ${DINKY_LIB_DIR}/mysql-connector-j-8.4.0.jar${RESET}" | ||
if [ -f "${DINKY_LIB_DIR}/mysql-connector-j-8.4.0.jar" ]; then | ||
echo -e "${GREEN}mysql driver package downloaded successfully。${RESET}" | ||
else | ||
echo -e "${RED}Mysql driver package download failed, please check the network or download manually。${RESET}" | ||
exit 1 | ||
fi | ||
echo -e "${GREEN}After the verification is completed, subsequent installation and configuration operations can be performed as needed.。${RESET}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters