forked from tuna/tunasync-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathremi.sh
More file actions
executable file
·29 lines (20 loc) · 767 Bytes
/
remi.sh
File metadata and controls
executable file
·29 lines (20 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
# requires: wget, rsync
#
set -e
set -o pipefail
UPSTREAM=${TUNASYNC_UPSTREAM_URL:-"rsync://rpms.remirepo.net"}
REPOS=("enterprise" "fedora")
RSYNC_OPTS="-aHvh --no-o --no-g --stats --exclude .~tmp~/ --delete --delete-excluded --delete-after --delay-updates --safe-links --timeout=120 --contimeout=120"
USE_IPV6=${USE_IPV6:-"0"}
if [[ $USE_IPV6 == "1" ]]; then
RSYNC_OPTS="-6 ${RSYNC_OPTS}"
fi
for repo in ${REPOS[@]}; do
upstream=${UPSTREAM}/${repo}
dest=${TUNASYNC_WORKING_DIR}/${repo}
[ ! -d "$dest" ] && mkdir -p "$dest"
rsync ${RSYNC_OPTS} "$upstream" "$dest"
done
wget -O ${TUNASYNC_WORKING_DIR}/index.html http://rpms.remirepo.net/index.html
wget -O ${TUNASYNC_WORKING_DIR}/PRM-GPG-KEY-remi http://rpms.remirepo.net/RPM-GPG-KEY-remi