Summary Files Commits Branches @commit @diff @stats
path: root / generate-dev.sh
diff options
context:
space:
mode:
Commit1eaeb63af578fe4b53847e23f5677095b0851bda (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-04-01 17:03:06 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-04-01 17:03:06 +0300
Files81b6c547b8101232d69a0dd2b16a130e01d32415 /generate-dev.sh
syndamia.com-1eaeb63af578fe4b53847e23f5677095b0851bda.tar
syndamia.com-1eaeb63af578fe4b53847e23f5677095b0851bda.tar.gz
syndamia.com-1eaeb63af578fe4b53847e23f5677095b0851bda.zip
Parent7faf14cb34e5d9ff6ede1bb95e39fe9c62bea5f5 (diff)
[generate] Added support for awk "libarires" (collections of functions)
1 files changed, 8 insertions, 2 deletions
-rwxr-xr-xgenerate-dev.sh10
diff --git a/generate-dev.sh b/generate-dev.sh
index 0911fce..df462f9 100755
--- a/generate-dev.sh
+++ b/generate-dev.sh
@@ -23,7 +23,8 @@ endTimer () {
combine() {
startTimer
- find './awk-edits' -type f -name "[A-Z]*.awk" -exec cat {} + > /tmp/syndamiadotcom-awk
+ find './awk-edits' -type f -name "#*.awk" -exec cat {} + > /tmp/syndamiadotcom-awk
+ find './awk-edits' -type f -name "[A-Z]*.awk" -exec cat {} + >> /tmp/syndamiadotcom-awk
find './awk-edits' -type f -name "_*.awk" -exec cat {} + >> /tmp/syndamiadotcom-awk
find './awk-edits' -type f -name "[a-z]*.awk" -exec cat {} + >> /tmp/syndamiadotcom-awk
endTimer "generation of /tmp/syndamiadotcom-awk"
@@ -36,10 +37,15 @@ combine() {
}
separated() {
+ libs=""
+ for l in $(find './awk-edits' -type f -name "#*.awk"); do
+ libs+=" -f $l "
+ done
+
for i in $(find './awk-edits' -type f -name "[A-Z]*.awk") $(find './awk-edits' -type f -name "[a-z]*.awk"); do
startTimer
for file in $(find '/var/www/synd/' -type f -name "*.html"); do
- awk -f "$i" -f './awk-edits/_print.awk' "$file" > tmp && mv -f tmp "$file"
+ awk $libs -f "$i" -f './awk-edits/_print.awk' "$file" > tmp && mv -f tmp "$file"
done
endTimer "$i"
done