diff options
author | Paul Phillips <paulp@improving.org> | 2012-03-18 10:42:20 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-03-18 10:42:20 -0700 |
commit | 513232f251f1e1ce89adbde53fa1ccec67bda24d (patch) | |
tree | 7792247e953f37dc6c05fe64baeb0841811f31cd /tools/verify-jar-cache | |
parent | f90efea9600cd9bd39537b256e371a093aa994cd (diff) | |
parent | b3efb3d493605d1c7e106e5f0a697b52ebb3d97c (diff) | |
download | scala-513232f251f1e1ce89adbde53fa1ccec67bda24d.tar.gz scala-513232f251f1e1ce89adbde53fa1ccec67bda24d.tar.bz2 scala-513232f251f1e1ce89adbde53fa1ccec67bda24d.zip |
Merge remote-tracking branches 'axel22/feature/checkinit-transient' and 'jsuereth/mirrored-seq-extractors' into develop
Diffstat (limited to 'tools/verify-jar-cache')
-rwxr-xr-x | tools/verify-jar-cache | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/verify-jar-cache b/tools/verify-jar-cache index 1e86264ecb..8a376a6987 100755 --- a/tools/verify-jar-cache +++ b/tools/verify-jar-cache @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # Discovers files whose sha sum does not match the # sha embedded in their directory name from ~/.sbt/cache/scala. @@ -9,14 +9,14 @@ cd ~/.sbt/cache/scala unset failed unset removal -[[ $1 == "-f" ]] && removal=true +[[ "$1" == "-f" ]] && removal=true for file in $(find . -type f); do sha=$(echo "${file:2}" | sed 's/\/.*$//') sum=$(shasum "$file" | sed 's/ .*$//') if [[ $sum != $sha ]]; then failed=true - if [[ -n $removal ]]; then + if [[ -n "$removal" ]]; then echo "Removing corrupt file $file, shasum=$sum" rm -rf $sha else @@ -25,9 +25,9 @@ for file in $(find . -type f); do fi done -if [[ -z $failed ]]; then +if [[ -z "$failed" ]]; then echo "All cached files match their shas." -elif [[ -z $removal ]]; then +elif [[ -z "$removal" ]]; then echo "" echo "Run again with -f to remove the corrupt files." fi |