aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorikoamu <ikoamu@gmail.com>2024-04-04 08:48:27 +0900
committerikoamu <ikoamu@gmail.com>2024-04-04 08:48:27 +0900
commitae44476b8faea9a5a098d3f8c91b8908e9cef508 (patch)
tree2c7f5bbacbdd954a8c4226b5bd313fe11688af4e
parent03511900acb6fff67be87863493c1cfd0aee71e7 (diff)
support no-timestamp file
-rwxr-xr-xcreate_notes.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/create_notes.sh b/create_notes.sh
index 9965593..452230e 100755
--- a/create_notes.sh
+++ b/create_notes.sh
@@ -9,8 +9,7 @@ jq -c '.data.nodes[]' |
while read -r nodes; do
id=$(echo "${nodes}" | jq -r '.id')
file=$(echo "${nodes}" | jq -r '.file')
- timestamp=$(echo "${file}" | cut -d'-' -f1)
- matching_file=$(find "${org_path}" -name "${timestamp}-*.org" -type f)
+ matching_file=$(find "${org_path}" -name "${file}" -type f)
if [[ -f "${matching_file}" ]]; then
cp -p "${matching_file}" "notes/${id}"