heissepreise/docker/fixup.sh

12 lines
393 B
Bash
Raw Permalink Normal View History

#!/bin/bash
2023-05-27 21:57:06 +02:00
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
2023-06-03 00:56:45 +02:00
pushd $dir/.. > /dev/null
2023-06-03 00:57:21 +02:00
git checkout -- .
2023-05-27 21:57:06 +02:00
pushd site
find . -type f -name "*.html" -print0 | while IFS= read -r -d $'\0' file; do
sed -i 's/href="index\.html"/href="index-old.html"/g' "$file"
done
echo "Replacement complete."
2023-05-27 21:57:06 +02:00
popd
mv site/index.html site/index-old.html
mv site/index-new.html site/index.html