Initial commit
This commit is contained in:
39
run.sh
Executable file
39
run.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
VERSION=30
|
||||
ARCH="x86_64"
|
||||
REPO_DIR=/rpmfusion
|
||||
|
||||
MIRROR=(
|
||||
"rsync://download1.rpmfusion.org/rpmfusion/"
|
||||
)
|
||||
|
||||
|
||||
for ((i=0; i<${#MIRROR[@]}; i++)); do
|
||||
rsync --progress -amH --numeric-ids --delete --delete-delay --delay-updates \
|
||||
--exclude='*/drpms' \
|
||||
--exclude='*/images' \
|
||||
--exclude='*/Docker' \
|
||||
--exclude='*/CloudImages' \
|
||||
--exclude='*/debug' \
|
||||
--exclude='*/iso' \
|
||||
--exclude='*/development'\
|
||||
--exclude='*/testing'\
|
||||
--exclude='*/tainted'\
|
||||
--exclude='*/rpi'\
|
||||
--exclude='*/steam'\
|
||||
--exclude='*/nvidia-driver'\
|
||||
--include="**/${VERSION}/**${ARCH}/***" \
|
||||
--include='*/' --exclude='*' \
|
||||
"${MIRROR[i]}" "${REPO_DIR}"
|
||||
done
|
||||
|
||||
find "${REPO_DIR}" -name "*comps-*.xml" -exec sh -c 'cp -av {} "$(dirname {})/../comps.xml"' \;
|
||||
|
||||
|
||||
for i in $(find "${REPO_DIR}" -type d -name 'repodata' -exec dirname '{}' \;); do
|
||||
createrepo --update -g comps.xml "$i"
|
||||
done
|
||||
|
||||
dnf download --refresh --best --destdir /data/Packages/ $PACKAGES
|
||||
createrepo /data --verbose --database --deltas
|
Reference in New Issue
Block a user