summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schwarz <michi.schwarz@gmail.com>2014-12-04 10:18:44 +0100
committerMichael Schwarz <michi.schwarz@gmail.com>2014-12-04 10:18:44 +0100
commit9da7f66feec3ec222760e5d34ff83e43ab41af39 (patch)
tree521a050cae6f88fe6a8bb18bb3c8b1f420c24de2
parent2c62798f699bc934d428458e3839df6f72095935 (diff)
downloadpogojig-9da7f66feec3ec222760e5d34ff83e43ab41af39.tar.gz
pogojig-9da7f66feec3ec222760e5d34ff83e43ab41af39.tar.bz2
pogojig-9da7f66feec3ec222760e5d34ff83e43ab41af39.zip
Added an example for gnerating OpenSCAD files.
-rw-r--r--.gitignore3
-rwxr-xr-xgenerate_sources.sh6
2 files changed, 7 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index a6a369a..90abfc2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,6 @@
*.pyc
*.dxf
*.stl
+
+# Generated files
+/src/generated/
diff --git a/generate_sources.sh b/generate_sources.sh
index 8ac6afa..4a05760 100755
--- a/generate_sources.sh
+++ b/generate_sources.sh
@@ -19,5 +19,7 @@ function generate_file() {
}
# Call generate_file for each file to be generated.
-# E.g.:
-# generate_file src/test.scad echo "cube();"
+for i in {1..5}; do
+ size=$[ $i * 10 ]
+ generate_file "src/generated/cube_$size.scad" echo "cube($size);"
+done