diff options
author | crupest <crupest@outlook.com> | 2022-12-02 13:38:28 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-12-02 13:42:05 +0800 |
commit | e2bd8d8048243ca8a5c3e07db2fe14b093c41870 (patch) | |
tree | 23bb6afe40f475261668d5e71e50bd067d69cdcb /docker/crupest-blog/install-hugo.bash | |
parent | cf85a3edda5953581dd1226fb0c7a1923a405da6 (diff) | |
download | crupest-e2bd8d8048243ca8a5c3e07db2fe14b093c41870.tar.gz crupest-e2bd8d8048243ca8a5c3e07db2fe14b093c41870.tar.bz2 crupest-e2bd8d8048243ca8a5c3e07db2fe14b093c41870.zip |
Fix #11.
Diffstat (limited to 'docker/crupest-blog/install-hugo.bash')
-rwxr-xr-x | docker/crupest-blog/install-hugo.bash | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docker/crupest-blog/install-hugo.bash b/docker/crupest-blog/install-hugo.bash new file mode 100755 index 0000000..5be5d03 --- /dev/null +++ b/docker/crupest-blog/install-hugo.bash @@ -0,0 +1,4 @@ +VERSION=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') +url="https://github.com/gohugoio/hugo/releases/download/v${VERSION}/hugo_extended_${VERSION}_linux-amd64.tar.gz" +curl -fL -o /root/hugo.tar.gz "${url}" +tar -xzf /root/hugo.tar.gz -C /usr/bin hugo |