mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 12:24:12 +00:00
migrating virtualbox,proxmox
This commit is contained in:
parent
d79cf7823e
commit
c6822bfee3
12
proxmox.sh
12
proxmox.sh
@ -4,24 +4,16 @@ set -e
|
|||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
_here=`dirname $(realpath $0)`
|
_here=`dirname $(realpath $0)`
|
||||||
. ${_here}/helpers/apt-download
|
apt_sync="${_here}/apt-sync.py"
|
||||||
|
|
||||||
[[ -z "${LOADED_APT_DOWNLOAD}" ]] && { echo "failed to load apt-download"; exit 1; }
|
|
||||||
|
|
||||||
BASE_URL="${TUNASYNC_UPSTREAM_URL:-"http://download.proxmox.com"}"
|
BASE_URL="${TUNASYNC_UPSTREAM_URL:-"http://download.proxmox.com"}"
|
||||||
BASE_PATH="${TUNASYNC_WORKING_DIR}"
|
BASE_PATH="${TUNASYNC_WORKING_DIR}"
|
||||||
|
|
||||||
APT_PATH="${BASE_PATH}/debian"
|
APT_PATH="${BASE_PATH}/debian"
|
||||||
|
|
||||||
APT_VERSIONS=("buster" "stretch" "jessie")
|
|
||||||
|
|
||||||
# === download deb packages ====
|
# === download deb packages ====
|
||||||
|
|
||||||
mkdir -p "${APT_PATH}"
|
"$apt_sync" "${BASE_URL}/debian" @debian-current pve-no-subscription,pvetest amd64 "$APT_PATH"
|
||||||
for version in ${APT_VERSIONS[@]}; do
|
|
||||||
apt-download-binary "${BASE_URL}/debian" "$version" "pve-no-subscription" "amd64" "${APT_PATH}" || true
|
|
||||||
apt-download-binary "${BASE_URL}/debian" "$version" "pvetest" "amd64" "${APT_PATH}" || true
|
|
||||||
done
|
|
||||||
echo "Debian finished"
|
echo "Debian finished"
|
||||||
|
|
||||||
# === download standalone files ====
|
# === download standalone files ====
|
||||||
|
@ -4,9 +4,7 @@ set -e
|
|||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
_here=`dirname $(realpath $0)`
|
_here=`dirname $(realpath $0)`
|
||||||
. ${_here}/helpers/apt-download
|
apt_sync="${_here}/apt-sync.py"
|
||||||
|
|
||||||
[[ -z "${LOADED_APT_DOWNLOAD}" ]] && { echo "failed to load apt-download"; exit 1; }
|
|
||||||
|
|
||||||
MAX_RETRY=${MAX_RETRY:-"3"}
|
MAX_RETRY=${MAX_RETRY:-"3"}
|
||||||
DOWNLOAD_TIMEOUT=${DOWNLOAD_TIMEOUT:-"1800"}
|
DOWNLOAD_TIMEOUT=${DOWNLOAD_TIMEOUT:-"1800"}
|
||||||
@ -17,7 +15,6 @@ BASE_PATH="${TUNASYNC_WORKING_DIR}"
|
|||||||
RPM_PATH="${BASE_PATH}/rpm"
|
RPM_PATH="${BASE_PATH}/rpm"
|
||||||
APT_PATH="${BASE_PATH}/apt"
|
APT_PATH="${BASE_PATH}/apt"
|
||||||
|
|
||||||
APT_VERSIONS=("bionic" "xenial" "trusty" "precise" "buster" "stretch" "jessie" "wheezy" "squeeze")
|
|
||||||
EL_VERSIONS=("5" "6" "7" "8")
|
EL_VERSIONS=("5" "6" "7" "8")
|
||||||
|
|
||||||
mkdir -p ${RPM_PATH} ${APT_PATH}
|
mkdir -p ${RPM_PATH} ${APT_PATH}
|
||||||
@ -51,16 +48,8 @@ fi
|
|||||||
rm $cfg
|
rm $cfg
|
||||||
|
|
||||||
# === download deb packages ====
|
# === download deb packages ====
|
||||||
if [[ ! -z ${DRY_RUN:-} ]]; then
|
|
||||||
export APT_DRY_RUN=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
for version in ${APT_VERSIONS[@]}; do
|
"$apt_sync" "${BASE_URL}/debian" @debian-current,@ubuntu-lts contrib,non-free amd64,i386 "$APT_PATH"
|
||||||
apt-download-binary "${BASE_URL}/debian" "$version" "contrib" "amd64" "${APT_PATH}" || true
|
|
||||||
apt-download-binary "${BASE_URL}/debian" "$version" "non-free" "amd64" "${APT_PATH}" || true
|
|
||||||
apt-download-binary "${BASE_URL}/debian" "$version" "contrib" "i386" "${APT_PATH}" || true
|
|
||||||
apt-download-binary "${BASE_URL}/debian" "$version" "non-free" "i386" "${APT_PATH}" || true
|
|
||||||
done
|
|
||||||
echo "Debian and ubuntu finished"
|
echo "Debian and ubuntu finished"
|
||||||
|
|
||||||
# === download standalone packages ====
|
# === download standalone packages ====
|
||||||
|
Loading…
x
Reference in New Issue
Block a user