Use temp directory for static deployments
This commit is contained in:
parent
9a8f3f270c
commit
52995adc46
|
@ -1,9 +1,21 @@
|
||||||
#!/usr/local/bin/bash
|
#!/usr/local/bin/bash
|
||||||
# $1 = source
|
# $1 = source
|
||||||
# $2 = destination
|
# $2 = destination
|
||||||
|
# $3 = temp dir
|
||||||
|
|
||||||
|
|
||||||
mkdir -p "$2"
|
while [ -e "$3" ]
|
||||||
git clone "$1" "$2"
|
do
|
||||||
rm -rf "$2/.git/"
|
echo "Waiting for another process to finish deploying..."
|
||||||
|
sleep 3
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
mkdir -p "$2" "$3"
|
||||||
|
|
||||||
|
git clone "$1" "$3"
|
||||||
|
rm -rf "$3/.git/"
|
||||||
|
cp -r "$3" "$2"
|
||||||
chmod -R g+w "$2"
|
chmod -R g+w "$2"
|
||||||
|
|
||||||
|
rm -rf "$3"
|
||||||
|
|
Loading…
Reference in New Issue