#!/bin/bash # Copyright Stephen Collier 2014,2019 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . #sudo umount /var/ftp/pub/home 1>/dev/null 2>&1 || exit 0 #sudo mount /var/ftp/pub/home if [ $1 == "el6" ] then timeout 24h /usr/local/bin/update_mythtv_rpm_docker sc-atrpms-6-x86_64 el6 x86_64 "https://mirrors.edge.kernel.org/centos/6/updates/x86_64/Packages/" # timeout 24h /usr/local/bin/update_mythtv_rpm_docker sc-atrpms-6-i386 el6 i686 "https://mirrors.edge.kernel.org/centos/6/updates/i386/Packages/" timeout 24h /usr/local/bin/update_mythtv_rpm_docker sc-atrpms-6-lt-x86_64 el6 x86_64 "https://mirrors.edge.kernel.org/centos/6/updates/x86_64/Packages/" # timeout 24h /usr/local/bin/update_mythtv_rpm_docker sc-atrpms-6-lt-i386 el6 i686 "https://mirrors.edge.kernel.org/centos/6/updates/i386/Packages/" fi if [ $1 == "el7" ] then #/usr/local/bin/update_mythtv_rpm sc-atrpms-7-x86_64 el7 x86_64 "https://ftp.scientificlinux.org/linux/scientific/7x/x86_64/updates/security/" #timeout 24h /usr/local/bin/update_mythtv_rpm sc-atrpms-7-x86_64 el7 x86_64 "https://ftp.scientificlinux.org/linux/scientific/7x/x86_64/updates/security/" timeout 24h /usr/local/bin/update_mythtv_rpm_docker sc-atrpms-7-x86_64 el7 x86_64 "http://mirror.centos.org/centos-7/7/updates/x86_64/Packages/" fi if [ $1 == "el7myth" ] then timeout 24h /usr/local/bin/update_mythtv_rpm_docker sc-atrpms-7myth-x86_64 el7myth x86_64 "http://mirror.centos.org/centos-7/7/updates/x86_64/Packages/" fi if [ $1 == "el8" ] then timeout 24h /usr/local/bin/update_mythtv_rpm_docker sc-atrpms-8-x86_64 el8 x86_64 "https://repo.almalinux.org/almalinux/8/BaseOS/x86_64/os/Packages/" fi if [ $1 == "el9" ] then timeout 24h /usr/local/bin/update_mythtv_rpm_docker sc-atrpms-9-x86_64 el9 x86_64 "https://repo.almalinux.org/almalinux/9/BaseOS/x86_64/os/Packages/" fi if [ $1 == "f31" ] then timeout 24h /usr/local/bin/update_mythtv_rpm_docker sc-atrpms-f31-x86_64 f31 x86_64 "https://dl.fedoraproject.org/pub/fedora/linux/updates/31/Everything/x86_64/Packages/k/" fi if [ $1 == "f32" ] then timeout 24h /usr/local/bin/update_mythtv_rpm_docker sc-atrpms-f32-x86_64 f32 x86_64 "https://dl.fedoraproject.org/pub/fedora/linux/updates/32/Everything/x86_64/Packages/k/" fi if [ $1 == "f33" ] then timeout 24h /usr/local/bin/update_mythtv_rpm_docker sc-atrpms-f33-x86_64 f33 x86_64 "https://dl.fedoraproject.org/pub/fedora/linux/updates/33/Everything/x86_64/Packages/k/" fi if [ $1 == "f34" ] then timeout 24h /usr/local/bin/update_mythtv_rpm_docker sc-atrpms-f34-x86_64 f34 x86_64 "https://dl.fedoraproject.org/pub/fedora/linux/updates/34/Everything/x86_64/Packages/k/" fi if [ $1 == "f38" ] then timeout 24h /usr/local/bin/update_mythtv_rpm_docker sc-atrpms-f38-x86_64 f38 x86_64 "https://dl.fedoraproject.org/pub/fedora/linux/updates/38/Everything/x86_64/Packages/k/" fi if [ $1 == "f39" ] then timeout 24h /usr/local/bin/update_mythtv_rpm_docker sc-atrpms-f39-x86_64 f39 x86_64 "https://dl.fedoraproject.org/pub/fedora/linux/updates/39/Everything/x86_64/Packages/k/" fi if [ $1 == "f40" ] then timeout 24h /usr/local/bin/update_mythtv_rpm_docker sc-atrpms-f40-x86_64 f40 x86_64 "https://dl.fedoraproject.org/pub/fedora/linux/updates/40/Everything/x86_64/Packages/k/" fi #rsync to upstream server and update last update file if changes #if [ `rsync -aiz --delete --password-file=/usr/local/etc/pass.txt /var/ftp/pub/home/ jeronimo@167.160.167.42::scrpms-up | wc -l` != '0' ]; then # date --utc > /var/ftp/pub/home/last_update; # rsync -avz --delete --password-file=/usr/local/etc/pass.txt /var/ftp/pub/home/ jeronimo@167.160.167.42::scrpms-up 2>&1 >/tmp/rsync$$ #fi if [ `rsync -rlptDiz --delete --password-file=/usr/local/etc/pass.txt /var/ftp/pub/home/* jeronimo@216.189.151.149::scrpms-up | wc -l` != '0' ]; then date --utc > /var/ftp/pub/home/last_update; rsync -rlptDvz --delete --password-file=/usr/local/etc/pass.txt /var/ftp/pub/home/* jeronimo@216.189.151.149::scrpms-up 2>&1 >/tmp/rsync$$ fi rsync -av /home/build/tmp/* /home/build/rpmbuild/SOURCES/