aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-05-02 22:05:54 -0300
committerEuAndreh <eu@euandre.org>2022-05-02 22:05:56 -0300
commitff111a47230fb47716b7590417391c809316729b (patch)
treefc821364830b2340af929efcb780a4548c551518
parentsrc/development/frontmatter-env.sh: Generate .env file from .md frontmatter (diff)
downloadeuandre.org-ff111a47230fb47716b7590417391c809316729b.tar.gz
euandre.org-ff111a47230fb47716b7590417391c809316729b.tar.xz
src/development/JEKYLL_COMPAT/copy-content.sh: Copy files while Jekyll is still active
To enable gradual deveopment of Jekyll phase-out.
-rwxr-xr-xsrc/development/JEKYLL_COMPAT/copy-content.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/development/JEKYLL_COMPAT/copy-content.sh b/src/development/JEKYLL_COMPAT/copy-content.sh
new file mode 100755
index 0000000..4857ac6
--- /dev/null
+++ b/src/development/JEKYLL_COMPAT/copy-content.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+set -eu
+
+# JEKYLL_COMPAT: copy files while things under `src/content/` aren't the
+# canonical source
+
+for f in _pastebins/*; do
+ NAME="$(basename "$f")"
+ DATE="$(echo "$NAME" | cut -d- -f-3 | tr '-' '/')"
+ FILENAME="$(echo "$NAME" | cut -d- -f4-)"
+
+ DIR="src/content/pastebin/$DATE"
+ mkdir -p "$DIR"
+
+ if [ ! -e "$DIR/$FILENAME" ]; then
+ cp "$f" "$DIR/$FILENAME"
+ fi
+done