34 lines
780 B
Bash
34 lines
780 B
Bash
#!/bin/bash
|
|
|
|
# Define the mod names and the response to the additional prompts
|
|
MOD_NAME1="metamod"
|
|
MOD_NAME2="amxmodx"
|
|
MOD_NAME3="amxmodxcs"
|
|
RESPONSE_TO_ADDITIONAL_PROMPTS="Y"
|
|
|
|
# Function to display [INFO] in blue and the message in default color
|
|
info() {
|
|
printf "\033[0;34m[INFO]\033[0m %s\n" "$1"
|
|
}
|
|
|
|
# Function to install a mod
|
|
install_mod() {
|
|
local mod_name=$1
|
|
{
|
|
echo "${mod_name}"
|
|
echo "${RESPONSE_TO_ADDITIONAL_PROMPTS}"
|
|
} | docker exec -i --user linuxgsm csserver ./csserver mods-install
|
|
}
|
|
|
|
# Install each mod
|
|
info "Installing mod: ${MOD_NAME1}"
|
|
install_mod "${MOD_NAME1}"
|
|
|
|
info "Installing mod: ${MOD_NAME2}"
|
|
install_mod "${MOD_NAME2}"
|
|
|
|
info "Installing mod: ${MOD_NAME3}"
|
|
install_mod "${MOD_NAME3}"
|
|
|
|
info "All mods installed successfully."
|