-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.sh
More file actions
39 lines (30 loc) · 804 Bytes
/
template.sh
File metadata and controls
39 lines (30 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
set -euo pipefail
cat LICENSE | comments.sh
printf "\n"
header() {
printf "This file was generated automatically:\n\n"
git-identity.sh . | indented.sh
printf "\n"
date -u --iso-8601=minutes | \
prefix.sh "Generation date-time (ISO 8601): " | \
indented.sh
}
header | comments.sh
printf "\n"
keywords_and_types() {
printf "Keywords and built-in types, as found in:\n\n"
git-identity.sh "$EMERALD_PATH" | indented.sh
}
body() {
keywords_and_types | comments.sh
printf "\n"
keywords_script="bin/getkeywords.sh"
builtins_script="bin/getbuiltins.sh"
"$EMERALD_PATH/${keywords_script}" | \
wrap_keywords.sh "${keywords_script}"
printf "\n"
"$EMERALD_PATH/${builtins_script}" | \
wrap_builtins.sh "${builtins_script}"
}
body | wrap_body.sh