-
Notifications
You must be signed in to change notification settings - Fork 0
/
qt-update-yum-repos
executable file
·40 lines (33 loc) · 1.08 KB
/
qt-update-yum-repos
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
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
#
# Create/update QMailToaster yum repositories
#####################################################################
# change log
# 04/11/14 shubes - changed to be run as a cron job
# 12/09/13 shubes - see if log files need to be excluded - they don't
# 12/06/13 shubes - only process repo if something has changed
# 12/02/13 shubes - modified to accept status as argument
# 11/24/13 shubes - migrated from qmailtoaster-plus to QMailToaster
# 08/22/09 shubes - created
#####################################################################
#####################################################################
# process each repo - $1 is full path to the flag file
#
a5_process_repo(){
flagfile=$1
repodir=${flagfile%/*}
echo "$me - processing $repodir"
rm $flagfile
createrepo --update --pretty $repodir 2>&1
}
#####################################################################
## begin main processing here
#
me=${0##*/}
myver=v1.2
echo "$me - $myver started"
for repoflag in $(find /repos/ -type f -name .needs-update); do
a5_process_repo $repoflag
done
echo "$me - ended"
exit 0