blob: 4857ac6bccf559079e739bb6f3033009e8c5321c (
plain) (
tree)
|
|
#!/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
|