Skip to content

Commit a01d096

Browse files
authored
Merge pull request #153 from amoralca16/fix-hugo-local
Fixing Install script for Hugo
2 parents d65df69 + a0569f0 commit a01d096

File tree

2 files changed

+5
-22
lines changed

2 files changed

+5
-22
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ deployed using [Hugo](https://gohugo.io).
55

66
## Usage for content publishing
77

8+
## Prerequisites
9+
- pip
10+
811
### Setup on your computer
912

1013
You need to clone this repository and run the `bin/install` script.

bin/install

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,9 @@
22

33
set -euo pipefail
44

5-
function eval_platform() {
6-
case ${OSTYPE} in
7-
"linux-gnu")
8-
echo Linux
9-
;;
10-
"darwin")
11-
echo macOS
12-
;;
13-
*)
14-
echo Unknown platform ${OSTYPE} >&2
15-
exit 1
16-
;;
17-
esac
18-
}
19-
205
function install_hugo() {
21-
PLATFORM=$(eval_platform)
22-
echo -n "Installing Hugo for ${PLATFORM}... "
23-
curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest \
24-
| grep -E "url.*hugo_extended.*${PLATFORM}.*tar.gz" \
25-
| cut -d : -f 2,3 \
26-
| tr -d \" \
27-
| wget -qi - -O- | tar xzf - -C ${ROOT}/bin hugo
6+
echo -n "Installing Hugo 0.123.8... "
7+
pip install hugo=="0.123.8"
288
echo "OK!"
299
}
3010

0 commit comments

Comments
 (0)