-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdev.sh
More file actions
executable file
·30 lines (27 loc) · 741 Bytes
/
dev.sh
File metadata and controls
executable file
·30 lines (27 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# Install Hugo if not already installed
if ! command -v hugo &> /dev/null
then
echo "Hugo not found. Installing Hugo..."
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS
if command -v brew &> /dev/null; then
brew install hugo
else
echo "Please install Homebrew first: https://brew.sh"
exit 1
fi
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
# Linux
sudo snap install hugo
else
echo "Please install Hugo manually: https://gohugo.io/installation/"
exit 1
fi
fi
echo "Hugo version:"
hugo version
echo ""
echo "Starting Hugo development server..."
echo "Visit http://localhost:1313 to view your site"
hugo server -D