diff options
| Commit | 1eaeb63af578fe4b53847e23f5677095b0851bda (patch) | |
|---|---|---|
| Author | 2023-04-01 17:03:06 +0300 | |
| Committer | 2023-04-01 17:03:06 +0300 | |
| Files | 81b6c547b8101232d69a0dd2b16a130e01d32415 | |
| syndamia.com-1eaeb63af578fe4b53847e23f5677095b0851bda.tar syndamia.com-1eaeb63af578fe4b53847e23f5677095b0851bda.tar.gz syndamia.com-1eaeb63af578fe4b53847e23f5677095b0851bda.zip | ||
| Parent | 7faf14cb34e5d9ff6ede1bb95e39fe9c62bea5f5 (diff) | |
[generate] Added support for awk "libarires" (collections of functions)
2 files changed, 10 insertions, 3 deletions
| -rwxr-xr-x | generate-dev.sh | 10 | ||||
| -rwxr-xr-x | generate.sh | 3 |
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 diff --git a/generate.sh b/generate.sh index 902bcc5..4af6c01 100755 --- a/generate.sh +++ b/generate.sh @@ -15,7 +15,8 @@ ssg src website "Syndamia" "https://syndamia.com" allnormfiles=$(find './website' -type f -name "*.html") -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 |