No subject

Nick Bebout nb at puppet01.phx2.fedoraproject.org
Wed Apr 28 20:16:08 UTC 2010


function cleanlock()
{                   
    /bin/rm -f /var/lock/$1.lock
}                               


function quit()
{              
    echo $1
    if [ $2 ]
    then
        cleanlock $2
    fi
    exit 2
}

function newlock()
{
    if [ -f /var/lock/$1.lock ]
    then
        quit "Lockfile exists.. Remove /var/lock/$1.lock"
    else
        touch /var/lock/$1.lock
    fi
}

newlock docSync
if [ ! -d /srv/web/docs ]
then
	echo "/srv/web/docs missing"
	cd /srv/web
	git clone git://git.fedoraproject.org/git/docs/web.git docs
fi


cd /srv/web/docs
git reset --hard
git pull

/sbin/restorecon -R /srv/web/docs/
cleanlock docSync


More information about the infrastructure mailing list