44 lines
1.0 KiB
Bash
Executable File
44 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Function to start Hugo development server
|
|
function start_hugo() {
|
|
cd docker/showerloop/public
|
|
hugo server --disableFastRender --minify --gc --navigateToChanged -D --bind "0.0.0.0" --baseURL "http://localhost:1313/"
|
|
}
|
|
|
|
# Function for quick git commit and push
|
|
function quick_commit() {
|
|
git add . && git commit -m "Updates and improvements" && git push
|
|
}
|
|
|
|
# Function to start a new development session
|
|
function start_session() {
|
|
git pull
|
|
start_hugo
|
|
}
|
|
|
|
# Show usage if no arguments provided
|
|
if [ $# -eq 0 ]; then
|
|
echo "Usage:"
|
|
echo " ./dev.sh start - Pull latest changes and start Hugo server"
|
|
echo " ./dev.sh commit - Quick commit and push changes"
|
|
echo " ./dev.sh hugo - Start Hugo server only"
|
|
exit 1
|
|
fi
|
|
|
|
# Handle command line arguments
|
|
case "$1" in
|
|
"start")
|
|
start_session
|
|
;;
|
|
"commit")
|
|
quick_commit
|
|
;;
|
|
"hugo")
|
|
start_hugo
|
|
;;
|
|
*)
|
|
echo "Unknown command: $1"
|
|
exit 1
|
|
;;
|
|
esac |