summaryrefslogtreecommitdiff
path: root/generate_sources.sh
diff options
context:
space:
mode:
authorMichael Schwarz <michi.schwarz@gmail.com>2017-09-20 20:33:29 +0200
committerMichael Schwarz <michi.schwarz@gmail.com>2017-09-20 20:33:29 +0200
commit3566dbc9438935d7cc6951a882a9d2ca148fb58d (patch)
tree6680102d912bed0e2eb528c06e09fecc876fd96b /generate_sources.sh
parent673a546066aed704d7087740a4190a023a7c9220 (diff)
downloadpogojig-3566dbc9438935d7cc6951a882a9d2ca148fb58d.tar.gz
pogojig-3566dbc9438935d7cc6951a882a9d2ca148fb58d.tar.bz2
pogojig-3566dbc9438935d7cc6951a882a9d2ca148fb58d.zip
PEP8
Diffstat (limited to 'generate_sources.sh')
-rwxr-xr-xgenerate_sources.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/generate_sources.sh b/generate_sources.sh
index 8ac6afa..0a2af79 100755
--- a/generate_sources.sh
+++ b/generate_sources.sh
@@ -6,16 +6,16 @@ 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
+ 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.