diff --git a/docs/docs.sh b/docs/docs.sh index df5e96938..e5a8e7485 100755 --- a/docs/docs.sh +++ b/docs/docs.sh @@ -45,11 +45,28 @@ clean_all() { install_linux() { install_py sudo apt update - sudo apt install -y \ + sudo apt --yes install \ make \ - docker.io \ doxygen \ graphviz + sudo apt --yes install apt-transport-https ca-certificates curl software-properties-common + curl -fsSL https://download.docker.com/linux/ubuntu/gpg \ + | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ + | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null + + if [ "$(getent group docker)" ]; then + echo "group docker already exists." + else + sudo addgroup docker + fi + + sudo usermod -aG docker "${USER}" + + sudo apt update + apt-cache policy docker-ce + sudo apt --yes install docker-ce + docker pull lycheeverse/lychee echo "If you wish to use \`./docs.sh check\` to check validity of links locally, please follow installation instructions at https://github.com/lycheeverse/lychee" } @@ -69,7 +86,7 @@ launch_browser() { check_links() { echo "If you wish to use \`./docs.sh check\` to check validity of links locally, please follow installation instructions at https://github.com/lycheeverse/lychee" - docker run --init -it --rm -w /input -v $(pwd)/..:/input lycheeverse/lychee -c ./docs/lychee.toml . + docker run --init -it --rm -w /input -v "$(pwd)/..":/input lycheeverse/lychee -c ./docs/lychee.toml . # lychee .. }