mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 04:12:42 +00:00
fix scripts
This commit is contained in:
parent
2835a3d4fa
commit
52d23375e1
6
mysql.sh
6
mysql.sh
@ -4,7 +4,7 @@ set -e
|
||||
set -o pipefail
|
||||
|
||||
_here=`dirname $(realpath $0)`
|
||||
alias apt-sync="${_here}/apt-sync.py"
|
||||
apt_sync="${_here}/apt-sync.py"
|
||||
|
||||
BASE_PATH="${TUNASYNC_WORKING_DIR}"
|
||||
BASE_URL="${TUNASYNC_UPSTREAM_URL:-"https://repo.mysql.com"}"
|
||||
@ -26,9 +26,9 @@ mkdir -p ${YUM_PATH} ${UBUNTU_PATH} ${DEBIAN_PATH}
|
||||
|
||||
# =================== APT repos ===============================
|
||||
MYSQL_APT_REPOS="mysql-5.6,mysql-5.7,mysql-tools,connector-python-2.1,mysql-8.0"
|
||||
apt-sync "${BASE_URL}/apt/ubuntu" @ubuntu-lts $MYSQL_APT_REPOS amd64,i386 "${UBUNTU_PATH}"
|
||||
"$apt_sync" "${BASE_URL}/apt/ubuntu" @ubuntu-lts $MYSQL_APT_REPOS amd64,i386 "${UBUNTU_PATH}"
|
||||
echo "Ubuntu finished"
|
||||
apt-sync "${BASE_URL}/apt/debian" @debian-current $MYSQL_APT_REPOS amd64,i386 "${DEBIAN_PATH}"
|
||||
"$apt_sync" "${BASE_URL}/apt/debian" @debian-current $MYSQL_APT_REPOS amd64,i386 "${DEBIAN_PATH}"
|
||||
echo "Debian finished"
|
||||
|
||||
# =================== YUM/DNF repos ==========================
|
||||
|
47
percona.sh
47
percona.sh
@ -1,47 +0,0 @@
|
||||
#!/bin/bash
|
||||
# requires: createrepo reposync wget curl
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
_here=`dirname $(realpath $0)`
|
||||
alias apt-sync="${_here}/apt-sync.py"
|
||||
|
||||
BASE_PATH="${TUNASYNC_WORKING_DIR}"
|
||||
BASE_URL=${TUNASYNC_UPSTREAM_URL:-"https://repo.percona.com"}
|
||||
|
||||
YUM_PATH="${BASE_PATH}/yum"
|
||||
APT_PATH="${BASE_PATH}/apt"
|
||||
|
||||
EL_VERSIONS=("6" "7")
|
||||
|
||||
# =================== APT repos ===============================
|
||||
apt-sync "${BASE_URL}/apt" @debian-current,@ubuntu-lts main amd64,i386 "${APT_PATH}"
|
||||
echo "APT finished"
|
||||
|
||||
# =================== YUM/DNF repos ==========================
|
||||
mkdir -p ${YUM_PATH}
|
||||
|
||||
cache_dir="/tmp/yum-percona-cache/"
|
||||
cfg="/tmp/yum-percona.conf"
|
||||
cat <<EOF > ${cfg}
|
||||
[main]
|
||||
keepcache=0
|
||||
|
||||
EOF
|
||||
|
||||
for elver in ${EL_VERSIONS[@]}; do
|
||||
cat << EOF >> $cfg
|
||||
[el${elver}]
|
||||
name=el${elver}
|
||||
baseurl=${BASE_URL}/centos/$elver/os/x86_64/
|
||||
enabled=1
|
||||
EOF
|
||||
done
|
||||
|
||||
if [[ -z ${DRY_RUN:-} ]]; then
|
||||
reposync -c $cfg -d -p ${YUM_PATH} -e $cache_dir
|
||||
for elver in ${EL_VERSIONS[@]}; do
|
||||
createrepo --update -v -c $cache_dir -o ${YUM_PATH}/el${elver}/ ${YUM_PATH}/el${elver}/
|
||||
done
|
||||
fi
|
||||
rm $cfg
|
Loading…
x
Reference in New Issue
Block a user