-
Notifications
You must be signed in to change notification settings - Fork 0
/
orbital_list_gen.sh
executable file
·30 lines (28 loc) · 1.15 KB
/
orbital_list_gen.sh
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
#!/usr/bin/env bash
for file in srcs/includes/functions_*.inc; do
grep '^#declare ' "$file" \
| awk -v input_file="$file" \
' ($2 ~ /^R/) {
print "Radial function:" $2;
radial_function = $2;
function_shell = gensub( \
/.*\/functions_([A-Za-z0-9]+)\.inc/, \
"\\1", \
"g", \
input_file);
print "Function shell:" function_shell;
}
($2 ~ /^Y/) {
print "Angular function:" $2;
angular_function = $2;
system ("RADIAL_FUNCTION=" radial_function \
" ANGULAR_FUNCTION=" angular_function \
" FUNCTION_SHELL=" function_shell \
" envsubst <srcs/template.povt > srcs/auto_" \
radial_function \
"-" \
angular_function \
".pov" \
) \
}'
done