From b86576c5f61cff36c80c9e0efd9d77f50dac745b Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 22 Dec 2016 00:16:12 +0100 Subject: [PATCH] Unhide metadata directory, move helpers script up in tree. --- processor/all.do | 2 +- processor/default.html.do | 4 ++-- processor/feed.xml.do | 4 ++-- processor/{.meta => }/helpers.sh | 0 processor/index.html.do | 4 ++-- processor/{.meta => metadata}/author.do | 0 processor/{.meta => metadata}/default.feed_snippet.do | 2 +- processor/{.meta => metadata}/default.index_snippet.do | 2 +- processor/{.meta => metadata}/default.intermediate.do | 0 processor/{.meta => metadata}/default.uuid.do | 0 processor/{.meta => metadata}/intermediate.tmpl | 0 processor/{.meta => metadata}/title.do | 0 processor/{.meta => metadata}/url.do | 0 processor/{.meta => metadata}/uuid.do | 0 test.sh | 6 +++--- test/test_files/{.meta => metadata}/author | 0 test/test_files/{.meta => metadata}/title | 0 test/test_files/{.meta => metadata}/url | 0 18 files changed, 12 insertions(+), 12 deletions(-) rename processor/{.meta => }/helpers.sh (100%) rename processor/{.meta => metadata}/author.do (100%) rename processor/{.meta => metadata}/default.feed_snippet.do (98%) rename processor/{.meta => metadata}/default.index_snippet.do (96%) rename processor/{.meta => metadata}/default.intermediate.do (100%) rename processor/{.meta => metadata}/default.uuid.do (100%) rename processor/{.meta => metadata}/intermediate.tmpl (100%) rename processor/{.meta => metadata}/title.do (100%) rename processor/{.meta => metadata}/url.do (100%) rename processor/{.meta => metadata}/uuid.do (100%) rename test/test_files/{.meta => metadata}/author (100%) rename test/test_files/{.meta => metadata}/title (100%) rename test/test_files/{.meta => metadata}/url (100%) diff --git a/processor/all.do b/processor/all.do index 3c3a021..5857254 100644 --- a/processor/all.do +++ b/processor/all.do @@ -1,7 +1,7 @@ #!/bin/sh # Set up directories. -metadata_dir=.meta +metadata_dir=metadata public_dir=public cur_dir=$(pwd) mkdir -p "$public_dir" diff --git a/processor/default.html.do b/processor/default.html.do index 99be463..fcef3ef 100644 --- a/processor/default.html.do +++ b/processor/default.html.do @@ -1,8 +1,8 @@ #!/bin/sh # Pull in global dependencies. -metadata_dir=.meta -. "$metadata_dir"/helpers.sh +. ./helpers.sh +metadata_dir=metadata intermediate_file="${metadata_dir}/${1%.html}.intermediate" title_file="${metadata_dir}"/title redo-ifchange "$title_file" diff --git a/processor/feed.xml.do b/processor/feed.xml.do index 2b43969..19ba026 100644 --- a/processor/feed.xml.do +++ b/processor/feed.xml.do @@ -1,8 +1,8 @@ #!/bin/sh # Pull in global dependencies. -metadata_dir=.meta -. "$metadata_dir"/helpers.sh +. ./helpers.sh +metadata_dir=metadata author_file="$metadata_dir"/author uuid_file="$metadata_dir"/uuid title_file="$metadata_dir"/title diff --git a/processor/.meta/helpers.sh b/processor/helpers.sh similarity index 100% rename from processor/.meta/helpers.sh rename to processor/helpers.sh diff --git a/processor/index.html.do b/processor/index.html.do index 64fe355..8636969 100644 --- a/processor/index.html.do +++ b/processor/index.html.do @@ -1,8 +1,8 @@ #!/bin/sh # Pull in global dependencies. -metadata_dir=.meta -. "$metadata_dir"/helpers.sh +. ./helpers.sh +metadata_dir=metadata srcdir=`pwd` title_file="$metadata_dir"/title redo-ifchange "$title_file" diff --git a/processor/.meta/author.do b/processor/metadata/author.do similarity index 100% rename from processor/.meta/author.do rename to processor/metadata/author.do diff --git a/processor/.meta/default.feed_snippet.do b/processor/metadata/default.feed_snippet.do similarity index 98% rename from processor/.meta/default.feed_snippet.do rename to processor/metadata/default.feed_snippet.do index 1949d0b..b09eaa0 100644 --- a/processor/.meta/default.feed_snippet.do +++ b/processor/metadata/default.feed_snippet.do @@ -1,7 +1,7 @@ #!/bin/sh # Pull in dependencies. -. ./helpers.sh +. ../helpers.sh src_file=$(get_source_file "$1") uuid_file="${1%.feed_snippet}.uuid" redo-ifchange "$uuid_file" diff --git a/processor/.meta/default.index_snippet.do b/processor/metadata/default.index_snippet.do similarity index 96% rename from processor/.meta/default.index_snippet.do rename to processor/metadata/default.index_snippet.do index 33499ed..d95b27b 100644 --- a/processor/.meta/default.index_snippet.do +++ b/processor/metadata/default.index_snippet.do @@ -1,7 +1,7 @@ #!/bin/sh # Pull in dependencies. -. ./helpers.sh +. ../helpers.sh src_file=$(get_source_file "$1") intermediate_file="${1%.index_snippet}.intermediate" redo-ifchange "$intermediate_file" diff --git a/processor/.meta/default.intermediate.do b/processor/metadata/default.intermediate.do similarity index 100% rename from processor/.meta/default.intermediate.do rename to processor/metadata/default.intermediate.do diff --git a/processor/.meta/default.uuid.do b/processor/metadata/default.uuid.do similarity index 100% rename from processor/.meta/default.uuid.do rename to processor/metadata/default.uuid.do diff --git a/processor/.meta/intermediate.tmpl b/processor/metadata/intermediate.tmpl similarity index 100% rename from processor/.meta/intermediate.tmpl rename to processor/metadata/intermediate.tmpl diff --git a/processor/.meta/title.do b/processor/metadata/title.do similarity index 100% rename from processor/.meta/title.do rename to processor/metadata/title.do diff --git a/processor/.meta/url.do b/processor/metadata/url.do similarity index 100% rename from processor/.meta/url.do rename to processor/metadata/url.do diff --git a/processor/.meta/uuid.do b/processor/metadata/uuid.do similarity index 100% rename from processor/.meta/uuid.do rename to processor/metadata/uuid.do diff --git a/test.sh b/test.sh index 8e2a024..f91d84e 100755 --- a/test.sh +++ b/test.sh @@ -42,14 +42,14 @@ redo cd "$working_dir" # Simple file comparison tests and UUID tests. -uuid_test "$generated_files_dir""/.meta/uuid" -for file in "$expected_files_dir"/*.html "$expected_files_dir"/.meta/*; do +uuid_test "$generated_files_dir""/metadata/uuid" +for file in "$expected_files_dir"/*.html "$expected_files_dir"/metadata/*; do sed_expression='s/'"$expected_files_dir_escaped"'/'"$generated_files_dir_escaped"'/' cmp_file=`echo "$file" | sed "$sed_expression"` if [ ! "$file" = "$expected_files_dir""/index.html" ] && \ echo "$file" | grep -q "\.html$"; then basename=$(basename "$cmp_file") - uuid_test "${generated_files_dir}/.meta/${basename%.html}.uuid" + uuid_test "${generated_files_dir}/metadata/${basename%.html}.uuid" fi diff_test "$file" "$cmp_file" done diff --git a/test/test_files/.meta/author b/test/test_files/metadata/author similarity index 100% rename from test/test_files/.meta/author rename to test/test_files/metadata/author diff --git a/test/test_files/.meta/title b/test/test_files/metadata/title similarity index 100% rename from test/test_files/.meta/title rename to test/test_files/metadata/title diff --git a/test/test_files/.meta/url b/test/test_files/metadata/url similarity index 100% rename from test/test_files/.meta/url rename to test/test_files/metadata/url -- 2.30.2