diff --git a/gen.sh b/gen.sh index 62b96e1..621816f 100755 --- a/gen.sh +++ b/gen.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Periph Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. @@ -6,10 +6,6 @@ set -eu cd "$(dirname $0)" -# Determine the docker image to use. -TAG="$(cat ./tag)" -IMAGE="marcaruel/hugo-tidy:${TAG}" - echo "Tips:" echo " - Use --buildDrafts to render drafts." @@ -17,6 +13,10 @@ echo " - Use --buildDrafts to render drafts." # expected. if [ $# == 0 ]; then if (which docker > /dev/null); then + # Determine the docker image to use. + TAG="$(cat ./tag)" + IMAGE="marcaruel/hugo-tidy:${TAG}" + echo "Using hugo-tidy" # See https://github.com/maruel/hugo-tidy/ for more info. # First, pull the image only if missing. diff --git a/new_post.sh b/new_post.sh index bf119f6..4107983 100755 --- a/new_post.sh +++ b/new_post.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2020 The Periph Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. diff --git a/serve.sh b/serve.sh index 48e90bd..1598657 100755 --- a/serve.sh +++ b/serve.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Periph Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. @@ -6,16 +6,16 @@ set -eu cd "$(dirname $0)" -# Determine the docker image to use. -TAG="$(cat ./tag)" -IMAGE="marcaruel/hugo-tidy:${TAG}" - echo "Tips:" echo " - Use --bind=0.0.0.0 to be accessible on the local network." echo " - Use --buildDrafts to render drafts." if (which docker > /dev/null); then echo "Using hugo-tidy" + # Determine the docker image to use. + TAG="$(cat ./tag)" + IMAGE="marcaruel/hugo-tidy:${TAG}" + # See https://github.com/maruel/hugo-tidy/ for more info. # First, pull the image only if missing. [ ! -z $(docker images -q "${IMAGE}") ] || docker pull "${IMAGE}"