X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=build%2Fcache.sh;h=7a2a063854c1ea1626797ebdbea505b6184f0538;hb=6f9e8e2c829412d350644fa6a820a8a2890f69b7;hp=52d28fa33b93e360a1ad7cc09093c7292b7a0623;hpb=58ab9100f56b4252578c9c13cb8060d87285f1ba;p=fuel.git diff --git a/build/cache.sh b/build/cache.sh index 52d28fa33..7a2a06385 100755 --- a/build/cache.sh +++ b/build/cache.sh @@ -19,7 +19,6 @@ exit_trap() { trap exit_trap EXIT CACHETRANSPORT=${CACHETRANSPORT:-"curl --silent"} -CACHEBASE=${CACHEBASE:-"file://${HOME}/cache"} CACHEMAXAGE=${CACHEMAXAGE:-$[14*24*3600]} CACHEDEBUG=${CACHEDEBUG:-1} @@ -38,7 +37,7 @@ errorexit () { # can be used when generating the SHA1 to make sure that the cache is # rebuilt bi-weekly even if no pruning of the cache is taking place. getbiweek () { - echo "$(date +'%G')$[$(date +'%V')/2]" + echo "$(date +'%G')$[10#$(date +'%V')/2]" } # Get a SHA1 based on what's piped into the cache command @@ -139,6 +138,12 @@ getcommitid() { fi } + + +if [ -z "$CACHEBASE" ]; then + errorexit "CACHEBASE not set - exiting..." +fi + case $1 in getbiweek) if [ $# -ne 1 ]; then