Remove --clone option, add empty scripts

This commit is contained in:
Florine W. Dekker 2021-04-14 18:32:55 +02:00
parent d6ce22b765
commit 5a591833ed
Signed by: FWDekker
GPG Key ID: B1B567AF58D6EE0F
4 changed files with 39 additions and 6 deletions

9
jekyll
View File

@ -3,7 +3,14 @@
# $2 = destination
# $3 = temp dir
rm -rf "$3"
while [ -e "$3" ]
do
echo "Waiting for another process to finish deploying..."
sleep 3
done
mkdir -p "$2" "$3"
git clone "$1" "$3"

View File

@ -0,0 +1,18 @@
#!/usr/local/bin/bash
# $1 = source repository
# $2 = destination repository, including tokens
# $3 = temp dir
while [ -e "$3" ]
do
echo "Waiting for another process to finish deploying..."
sleep 3
done
git clone --bare "$1" "$3"
cd "$3" || exit
git push --mirror "$2"
rm -rf "$3"

9
npm
View File

@ -4,22 +4,21 @@
# $3 = temp dir
# While another process is deploying
while [ -e "$3" ]
do
echo "Waiting for another process to finish deploying..."
sleep 3
done
mkdir -p "$2" "$3"
git --work-tree="$3" --git-dir="$1" checkout -f
git clone "$1" "$3"
cd "$3"
npm install
cd "$3" || exit
npm ci
npm run deploy
cp -r dist/ "$2"
chmod -R g+w "$2"
rm -rf "$3"

9
static
View File

@ -0,0 +1,9 @@
#!/usr/local/bin/bash
# $1 = source
# $2 = destination
mkdir -p "$2"
git clone "$1" "$2"
rm -rf "$2/.git/"
chmod -R g+w "$2"