Skip to content

Commit

Permalink
Update openthos
Browse files Browse the repository at this point in the history
Update openthos
  • Loading branch information
imcmy committed Feb 13, 2017
1 parent b7ddc76 commit afd90c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions deployer/script/openthos.sh
Expand Up @@ -16,12 +16,13 @@ warn() {
echo "$1"
}

cd /data/mirrors/openthos
latest=`curl -s -v -X HEAD $HOST 2>&1 | grep 'Last-Modified:' | cut -d ':' -f2 | awk '{gsub(/^ +| +$/,"")}1'`
last_modified=`cat $timestamp`

if [ $latest != $last_modified ]; then
if [ "$latest" != "$last_modified" ]; then
curl $HOST -LO
latest > $timestamp
echo "$latest" > $timestamp
fi

rm -f $lock
1 change: 1 addition & 0 deletions deployer/script/state.py
Expand Up @@ -21,6 +21,7 @@ def getState():

last_modify = {
'centos': '/timestamp.txt',
'openthos': '/timestamp.txt',
'android': '/repository',
'epel': '/fullfilelist',
'pypi': '/status'
Expand Down

0 comments on commit afd90c1

Please sign in to comment.