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 | 7ba7dd5b0863ca7fd7e16e5df1cc2103eabf3dac (patch) | |
tree | 23bb6afe40f475261668d5e71e50bd067d69cdcb /docker/crupest-blog/install-hugo.bash | |
parent | f0e48b2957d2ff8d66bb8d8a0cec673f8b424558 (diff) | |
download | crupest-7ba7dd5b0863ca7fd7e16e5df1cc2103eabf3dac.tar.gz crupest-7ba7dd5b0863ca7fd7e16e5df1cc2103eabf3dac.tar.bz2 crupest-7ba7dd5b0863ca7fd7e16e5df1cc2103eabf3dac.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 |