Skip to content

Commit 505c2ad

Browse files
authored
Fix make readme (#49)
* Fix typos * Fix `readme/init` target * `template/build` target should explicitly depend on `template/deps` target
1 parent 23eb6ae commit 505c2ad

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

bin/template_generate.sh

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ INCLUDED_MODULES=()
1616
function array-merge {
1717
# Declare an associative array
1818
declare -A tmp
19-
# Store the values of arr3 in arr4 as keys.
19+
# Store the values of arr3 in arr4 as keys
2020
for k in $@; do tmp["$k"]=1; done
21-
# Extract the keys.
21+
# Extract the keys
2222
echo "${!tmp[@]}"
2323
}
2424

@@ -31,7 +31,7 @@ function modules {
3131

3232
## Fire event $1 for all modules passed as args
3333
## Example of usage
34-
## fire event "test" "git" "make"
34+
## fire_event "test" "git" "make"
3535
## Will call functions "git-test" and "make-test" if exists
3636
function fire_event {
3737
local event=$1
@@ -46,7 +46,7 @@ function fire_event {
4646
done
4747
}
4848

49-
## Provde datasource options for modules passed as args
49+
## Provide datasource options for modules passed as args
5050
## Example of usage
5151
## datasources "git" "make"
5252
function datasources {
@@ -67,7 +67,7 @@ MODULES=$(modules $IN)
6767

6868
until [ -z "$MODULES" ]
6969
do
70-
## Merge modules list with modules from previous iteration
70+
## Merge module list with modules from previous iteration
7171
INCLUDED_MODULES=$( array-merge $INCLUDED_MODULES $MODULES)
7272
## Prepare data for just found modules
7373
fire_event "template-prepare-data" $MODULES
@@ -76,7 +76,7 @@ do
7676

7777
## For all iterations (except first) use $OUT file as $IN template to replace recursive placeholders
7878
IN=$OUT
79-
## Find modules in $IN file for next interation.
79+
## Find modules in $IN file for the next iteration
8080
MODULES=$(modules $IN)
8181
done
8282

@@ -86,6 +86,3 @@ fire_event "template-cleanup-data" $INCLUDED_MODULES
8686
rm -rf $TMP
8787

8888
echo "$OUT generated"
89-
90-
91-

modules/readme/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ readme/init:
1414
@if [ -s ./$(README_TEMPLATE_FILE) ]; then \
1515
echo "$(README_TEMPLATE_FILE) already exists!"; \
1616
else \
17-
cp $(BUILD_HARNESS_PATH)/templates/$(README_TEMPLATE_FILE) ./$(README_FILE) ; \
18-
echo "$(README_FILE) created!"; \
17+
cp $(BUILD_HARNESS_PATH)/templates/$(README_TEMPLATE_FILE) ./$(README_TEMPLATE_FILE) ; \
18+
echo "$(README_TEMPLATE_FILE) created!"; \
1919
fi;
2020

2121
## Create README.md by building it from .README.md file

modules/template/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ template/deps:
1212
@chmod +x $(GOMPLATE)
1313

1414
## Create $OUT file by building it from $IN template file
15-
template/build:
15+
template/build: template/deps
1616
@$(BUILD_HARNESS_PATH)/bin/template_generate.sh

0 commit comments

Comments
 (0)