Files
nicholaswilde_recipes/scripts/comments.sh
nιcнolaѕ wιlde b48d8a4b83 init commit
Signed-off-by: nιcнolaѕ wιlde <ncwilde43@gmail.com>
2022-10-02 02:52:57 -07:00

12 lines
427 B
Bash
Executable File

#!/bin/bash
set -e
set -o pipefail
readonly DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" >/dev/null 2>&1 && pwd )
for f in $(find "${DIR}" -not -path '*.github*' -not -path '*cook*' -not -path '*libbash*' -not -name '*index.md' -not -name '*README.md' -name \*.md); do
s=$(head -n 1 "${f}")
if [[ "${s}" != "---" ]]; then
printf "%s: %s\n" "${f}" "${s}"
# sed -i '1i ---\ncomments: true\n---' "${f}"
fi
done