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