forked from Bunteshaus/bunteshaus.de
small fixes
This commit is contained in:
parent
71a4c4f4b7
commit
6c3bcb9808
|
@ -26,28 +26,38 @@ else
|
|||
echo ""
|
||||
fi
|
||||
|
||||
for i in "${files[@]}"; do
|
||||
if ! unzip -l "${i}"|grep -q "index.de.md"; then
|
||||
for file in "${files[@]}"; do
|
||||
fname="$(basename ${file%.*})"
|
||||
folder="content/posts/${fname}"
|
||||
if ! unzip -l "${file}"|grep -q "index.de.md"; then
|
||||
err "maybe wrong archive, this is not compatible"
|
||||
exit 1
|
||||
fi
|
||||
fname="$(basename ${i%.*})"
|
||||
if ! [ -d content ]; then
|
||||
err "folder 'content' not found"
|
||||
exit 1
|
||||
fi
|
||||
set -x
|
||||
mkdir -p "content/posts/${fname}/"
|
||||
unzip -d "content/posts/${fname}/" "${i}"
|
||||
mkdir -p "${folder}"
|
||||
unzip -d "${folder}" "${file}"
|
||||
git add "${folder}"
|
||||
git commit -m "{$fname}"
|
||||
done
|
||||
|
||||
|
||||
output="Done."
|
||||
output_temp=""
|
||||
|
||||
for i in "${files[@]}"; do
|
||||
fname="$(basename ${i%.*})"
|
||||
for file in "${files[@]}"; do
|
||||
banner="false"
|
||||
fname="$(basename ${file%.*})"
|
||||
folder="content/posts/${fname}"
|
||||
if ! [ -e "${folder}/banner*" ]; then
|
||||
for f in $(find "${folder}" -type f); do
|
||||
if echo ${i}|grep -q "banner"; then
|
||||
banner="true"
|
||||
fi
|
||||
done
|
||||
if [ ${banner} == "false" ]; then
|
||||
output_temp="${output_temp}banner missing\n "
|
||||
fi
|
||||
done
|
||||
|
|
12
push.sh
12
push.sh
|
@ -1,18 +1,8 @@
|
|||
#!/bin/bash
|
||||
date="$(date +%Y-%m-%d)-test"
|
||||
|
||||
if ! git switch "${date}"; then
|
||||
git switch -c "${date}"
|
||||
fi
|
||||
|
||||
changedfiles=$(git diff --name-status|awk '{print $2}')
|
||||
|
||||
set -x
|
||||
git add . && \
|
||||
git commit -m "${date}: ${changedfiles}" && \
|
||||
git pull --rebase upstream main && \
|
||||
git push --set-upstream origin origin/"${date}" && \
|
||||
git switch main
|
||||
git push --set-upstream origin origin/main && \
|
||||
|
||||
exit
|
||||
git add content/posts
|
||||
|
|
Loading…
Reference in New Issue
Block a user