I've just read your coding standards and updated the code to match.
Robby Russell authored on 18/07/2011 at 16:00:07... | ... |
@@ -1,18 +1,18 @@ |
1 | 1 |
# Set this to 1 if you want to cache the tasks |
2 |
-cacheTaskList=1 |
|
2 |
+cache_task_list=1 |
|
3 | 3 |
|
4 | 4 |
# Cache filename |
5 |
-cacheFile='.cake-task-cache' |
|
5 |
+cache_file='.cake_task_cache' |
|
6 | 6 |
|
7 | 7 |
_cake_does_target_list_need_generating () { |
8 | 8 |
|
9 |
- if [ $cacheTaskList -eq 0 ]; then |
|
9 |
+ if [ $cache_task_list -eq 0 ]; then |
|
10 | 10 |
return 1; |
11 | 11 |
fi |
12 | 12 |
|
13 |
- if [ ! -f $cacheFile ]; then return 0; |
|
13 |
+ if [ ! -f $cache_file ]; then return 0; |
|
14 | 14 |
else |
15 |
- accurate=$(stat -f%m $cacheFile) |
|
15 |
+ accurate=$(stat -f%m $cache_file) |
|
16 | 16 |
changed=$(stat -f%m Cakefile) |
17 | 17 |
return $(expr $accurate '>=' $changed) |
18 | 18 |
fi |
... | ... |
@@ -21,8 +21,8 @@ _cake_does_target_list_need_generating () { |
21 | 21 |
_cake () { |
22 | 22 |
if [ -f Cakefile ]; then |
23 | 23 |
if _cake_does_target_list_need_generating; then |
24 |
- cake | sed -e "s/cake \([^ ]*\) .*/\1/" | grep -v '^$' > $cacheFile |
|
25 |
- compadd `cat $cacheFile` |
|
24 |
+ cake | sed -e "s/cake \([^ ]*\) .*/\1/" | grep -v '^$' > $cache_file |
|
25 |
+ compadd `cat $cache_file` |
|
26 | 26 |
else |
27 | 27 |
compadd `cake | sed -e "s/cake \([^ ]*\) .*/\1/" | grep -v '^$'` |
28 | 28 |
fi |