import repository from arizona
[raven.git] / apps / tppublish / tppublish_tag.sh
1 #!/bin/bash
2
3 YUM_DIR=$1
4 YUM_LS_FILE=$2
5 REPO_HTML_FILE=$3
6 TAGS=$4
7
8 python ./storktptohtml.py --debug stork "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALAfnXGY23wti1DrlMU2i4292LS6Pd1j6JyL3wZjCs3TIn0bmKDX4kPUUGJ3cExU7FUtgm6FX8h5daNojni7wVECAwEAAQ" -o $REPO_HTML_FILE -d $YUM_DIR --requiretags "$TAGS"
9
10 ls -l $YUM_DIR | grep -i ".rpm" > /tmp/yumrepo.ls
11
12 touch $YUM_LS_FILE
13
14 diff /tmp/yumrepo.ls $YUM_LS_FILE > /dev/null
15
16 if [[ $? == "1" ]]; then
17     echo "Rebuilding yum database"
18     cp /tmp/yumrepo.ls $YUM_LS_FILE
19     createrepo $YUM_DIR -s sha
20 fi
21