summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schwarz <michi.schwarz@gmail.com>2014-12-04 10:17:40 +0100
committerMichael Schwarz <michi.schwarz@gmail.com>2014-12-04 10:17:40 +0100
commitb3f93f02fd2362664e98611845ac09beb894552a (patch)
tree08b5decc29643c6990177914e6e6fd7dc65f5d73
parent260351e7db666c32d2a389e1d77884a6fe74d380 (diff)
downloadpogojig-b3f93f02fd2362664e98611845ac09beb894552a.tar.gz
pogojig-b3f93f02fd2362664e98611845ac09beb894552a.tar.bz2
pogojig-b3f93f02fd2362664e98611845ac09beb894552a.zip
Let the script to generate the sources also open the resulting files.
-rw-r--r--Makefile2
-rwxr-xr-xgenerate_sources.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 37a6547..81cbe15 100644
--- a/Makefile
+++ b/Makefile
@@ -44,4 +44,4 @@ $(foreach i,$(COMPILED_SCAD_FILES),$(eval $(i): $(filter $(dir $(i))%,$(LIBRARY_
# Rule for automaticlaly generated OpenSCAD files.
$(GENERATED_FILES): generate_sources.sh
- ./generate_sources.sh $@ > $@
+ ./generate_sources.sh $@
diff --git a/generate_sources.sh b/generate_sources.sh
index 2d33554..67fa258 100755
--- a/generate_sources.sh
+++ b/generate_sources.sh
@@ -13,7 +13,7 @@ function generate_file() {
if ! [ "$current_file_name" ]; then
echo "$file_name"
elif [ "$current_file_name" == "$file_name" ]; then
- "${generate_command[@]}"
+ "${generate_command[@]}" > "$file_name"
fi
}