Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit eb76eaa

Browse files
chalinkwalrath
authored andcommittedAug 30, 2016
chore(cache.sh): cleanup options and usage (#2221)
* chore(cache.sh): cleanup options and usage * add cd to project root
1 parent a24800a commit eb76eaa

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed
 

‎scripts/cache.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
set -e -o pipefail
44

5+
cd `dirname $0`/..
6+
57
BASE="public/docs/ts"
68
LATEST="$BASE/latest"
79
CACHE="$BASE/_cache"
@@ -71,16 +73,17 @@ function cacheDiff() {
7173
}
7274

7375
function usage() {
74-
echo "Usage: cache.sh [-d | -l | -r pattern]"
75-
echo " -d diff cache and latest subdirectories"
76-
echo " -l list files subject to caching"
77-
echo " -r pat refresh files in cache matching pattern"
76+
echo "Usage: cache.sh [options]"
77+
echo " (-ds|--diff-summary) list names of cache files that differ from ts/latest"
78+
echo " (-d|--diff) pat diff cache and latest subdirectories"
79+
echo " (-l|--list) list files subject to caching"
80+
echo " (-r|--refresh) pat refresh files in cache matching pattern"
7881
}
7982

8083
case "$1" in
81-
(-r|--refresh) shift; cacheRefresh $@;;
8284
(-ds|--diff-summary) shift; cacheDiffSummary $@;;
8385
(-d|--diff) shift; cacheDiff $@;;
84-
(-l) shift; printf "$FILES\n\n";;
86+
(-l|--list) shift; printf "$FILES\n\n";;
87+
(-r|--refresh) shift; cacheRefresh $@;;
8588
(*) usage;
8689
esac

0 commit comments

Comments
 (0)
This repository has been archived.