From: Arkadiusz Miƛkiewicz Date: Wed, 25 Sep 2013 17:51:05 +0000 (+0200) Subject: -k for keep cache X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=22605b2f083c6a28c34345268c51d593b80856df;p=packages%2Fgoogle-chrome.git -k for keep cache --- diff --git a/update-source.sh b/update-source.sh index 3788c02..c26852a 100755 --- a/update-source.sh +++ b/update-source.sh @@ -1,4 +1,12 @@ #!/bin/sh + +if [ "$1" = "-k" ]; then + cache=yes + shift +else + cache=no +fi + # product name product=chrome # name @@ -31,6 +39,7 @@ t=$(mktemp) #poldek -q --skip-installed --st=metadata --source "$sourceurl/" --cmd "ls google-chrome-$branch" > $t repodata=primary-$branch-$(date +%Y%m%d).xml +[ "$cache" = "yes" ] || rm -f "$repodata" test -e $repodata || { wget -c $sourceurl/repodata/primary.xml.gz gzip -dc primary.xml.gz > $repodata || test -s $repodata