mirror of
https://github.com/badlogic/heissepreise.git
synced 2024-09-22 00:00:59 +02:00
Mario is not good with Bash.
This commit is contained in:
parent
1a75092da4
commit
b3d3a30286
11
deploy.sh
11
deploy.sh
|
@ -1,14 +1,11 @@
|
|||
#!/bin/bash
|
||||
directory="site"
|
||||
if [ ! -d "$directory" ]; then
|
||||
echo "Directory does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "$directory" || exit 1
|
||||
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||
pushd $dir > /dev/null
|
||||
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."
|
||||
popd
|
||||
mv site/index.html site/index-old.html
|
||||
mv site/index-new.html site/index.html
|
|
@ -29,10 +29,8 @@ pushd $dir > /dev/null
|
|||
|
||||
case "$1" in
|
||||
start)
|
||||
pushd $dir/..
|
||||
git pull
|
||||
./deploy.sh
|
||||
popd
|
||||
../deploy.sh
|
||||
docker-compose -p heisse-preise -f docker-compose.base.yml -f docker-compose.prod.yml build
|
||||
docker-compose -p heisse-preise -f docker-compose.base.yml -f docker-compose.prod.yml up -d
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue
Block a user