OcttKB/local.sh

28 lines
368 B
Bash
Raw Normal View History

2023-03-04 23:12:24 +01:00
#!/bin/sh
set -e # Exit on any error
2023-03-04 23:12:24 +01:00
cd "$( dirname "$( realpath "$0" )" )"
pull(){
2023-03-04 23:12:24 +01:00
git pull
}
push(){
2023-03-04 23:12:24 +01:00
git add .
git commit -m "Manual push $(date)"
2023-03-04 23:12:24 +01:00
git push
}
deploy(){
Path="$1"
[ -n "$Path" ] || Path="/tmp/OcttKB-Deploy"
echo "Local Deploy to: $Path"
sleep 5
rm -rf "$Path"
cp -r . "$Path"
cd "$Path"
bash ./Bootstrap.sh
bash ./Deploy.Main.sh
}
$@