#215 apply more lowered

This commit is contained in:
neil 2022-12-07 13:07:00 +08:00
parent a559f5455e
commit 0cd7a5cba9

View file

@ -11,9 +11,10 @@ for row in $(jq -r '.[] | @base64' < "$1"); do
if [[ "$full_name" == *\/* ]] || [[ "$full_name" == *\\* ]] if [[ "$full_name" == *\/* ]] || [[ "$full_name" == *\\* ]]
then then
mkdir -p "$2/+$full_name" mkdir -p "$2/+$full_name"
# remove last folder
rm -rf "$2/+$full_name" rm -rf "$2/+$full_name"
fi fi
echo $full_name
touch "$2"/"+$full_name".md touch "$2"/"+$full_name".md
content="--- content="---
type: page type: page
@ -22,5 +23,5 @@ maintainer: \"$(_jq '.maintainer')\"
Description: \"$(_jq '.desc' | tr '\"' "'")\" Description: \"$(_jq '.desc' | tr '\"' "'")\"
layout: \"package-detail\" layout: \"package-detail\"
---" ---"
echo "$content" > "$2"/"+$(_jq '.full_name')".md echo "$content" > "$2"/"+$full_name".md
done done