mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-02-20 13:36:47 +01:00
- Fix 1: Parse -b/--branch and --mariadb-version with while-loop so only next token is used (avoids Branch_Name becoming 'v2.5.5-dev --mariadb-version 12.3') - Fix 2: Default Git_User to master3395 in Pre_Upgrade_Setup_Git_URL (04_git_url, monolithic) - Fix 3: upgrade.py uses CYBERPANEL_GIT_USER for git clone (default master3395); export CYBERPANEL_GIT_USER before upgrade.py in 08_main_upgrade and monolithic - Fix 4: --mariadb-version already supported in 05_repository.sh (MARIADB_VER_REPO)
28 lines
887 B
Bash
28 lines
887 B
Bash
#!/usr/bin/env bash
|
||
# CyberPanel upgrade – set Git content and clone URLs (usmannasir or override).
|
||
# Sourced by cyberpanel_upgrade.sh.
|
||
|
||
Pre_Upgrade_Setup_Git_URL() {
|
||
if [[ $Server_Country != "CN" ]] ; then
|
||
if [[ -n "$Git_User_Override" ]]; then
|
||
Git_User="$Git_User_Override"
|
||
echo -e "\nUsing GitHub repo: ${Git_User}/cyberpanel\n"
|
||
else
|
||
Git_User="usmannasir"
|
||
fi
|
||
Git_Content_URL="https://raw.githubusercontent.com/${Git_User}/cyberpanel"
|
||
Git_Clone_URL="https://github.com/${Git_User}/cyberpanel.git"
|
||
else
|
||
if [[ -n "$Git_User_Override" ]]; then
|
||
Git_User="$Git_User_Override"
|
||
else
|
||
Git_User="qtwrk"
|
||
fi
|
||
Git_Content_URL="https://gitee.com/${Git_User}/cyberpanel/raw"
|
||
Git_Clone_URL="https://gitee.com/${Git_User}/cyberpanel.git"
|
||
fi
|
||
if [[ "$Debug" = "On" ]] ; then
|
||
Debug_Log "Git_URL" "$Git_Content_URL"
|
||
fi
|
||
}
|