Skip to content

Commit

Permalink
Add cvmfs.sh
Browse files Browse the repository at this point in the history
CernVM File System
  • Loading branch information
yaoge123 authored Sep 18, 2024
1 parent 23c45fc commit b817106
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions cvmfs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
# requires: createrepo reposync wget curl
set -e
set -o pipefail

_here=`dirname $(realpath $0)`
apt_sync="${_here}/apt-sync.py"
yum_sync="${_here}/yum-sync.py"

BASE_PATH="${TUNASYNC_WORKING_DIR}"
BASE_URL="${TUNASYNC_UPSTREAM_URL:-"https://cvmrepo.s3-website.cern.ch/cvmrepo"}"

APT_PATH="${BASE_PATH}/apt"
YUM_PATH="${BASE_PATH}/yum"
export REPO_SIZE_FILE=/tmp/reposize.$RANDOM

# =================== APT repos ===============================
"$apt_sync" --delete "${BASE_URL}/apt" bionic-prod,bookworm-prod,bullseye-prod,buster-prod,focal-prod,jammy-prod,jessie-prod,noble-prod,precise-prod,stable,stretch-prod,trusty-prod,xenial-prod main i386,amd64 "$APT_PATH"
echo "APT finished"

# =================== YUM/DNF repos ==========================
"$yum_sync" "${BASE_URL}/yum/@{comp}/EL/@{os_ver}/@{arch}" 6-9 cvmfs,cvmfs-config,cvmfs-kernel aarch64,i386,ppc64le,x86_64 "@{comp}-EL@{os_ver}-@{arch}" "$YUM_PATH"
echo "YUM finished"

"${_here}/helpers/size-sum.sh" $REPO_SIZE_FILE --rm

0 comments on commit b817106

Please sign in to comment.