summaryrefslogtreecommitdiff
path: root/generate_sources.sh
diff options
context:
space:
mode:
Diffstat (limited to 'generate_sources.sh')
-rwxr-xr-xgenerate_sources.sh23
1 files changed, 0 insertions, 23 deletions
diff --git a/generate_sources.sh b/generate_sources.sh
deleted file mode 100755
index 0a2af79..0000000
--- a/generate_sources.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#! /usr/bin/env bash
-
-set -e -o pipefail
-
-current_file_name=$1
-
-# This function should be called for each generated file with the file's name as the first argument and the command to call to produce the file's content as the remaining arguments.
-function generate_file() {
- file_name=$1
- shift
- generate_command=("$@")
-
- if ! [ "$current_file_name" ]; then
- echo "$file_name"
- elif [ "$current_file_name" == "$file_name" ]; then
- mkdir -p "$(dirname "$file_name")"
- "${generate_command[@]}" > "$file_name"
- fi
-}
-
-# Call generate_file for each file to be generated.
-# E.g.:
-# generate_file src/test.scad echo "cube();"