build.sh: some cleanup with shellcheck

(cherry picked from commit cfebeb94b5)
This commit is contained in:
Daniel Frank 2019-08-18 13:15:52 +02:00
parent ced245aea5
commit 27ea5d3ebe
Signed by: tokudan
GPG key ID: 063CCCAD04182D32

View file

@ -72,6 +72,7 @@ announce GLUON: "$gluon_path" >&2
announce FFHH SITE PATH: "$site_path" >&2 announce FFHH SITE PATH: "$site_path" >&2
pushd "$site_path" pushd "$site_path"
# shellcheck source=/dev/null
. ./build.conf . ./build.conf
[ "${GLUON_BRANCH}" = "experimental" ] && GLUON_RELEASE="${GLUON_RELEASE}~exp$(date +%Y%m%d)" [ "${GLUON_BRANCH}" = "experimental" ] && GLUON_RELEASE="${GLUON_RELEASE}~exp$(date +%Y%m%d)"
export GLUON_RELEASE export GLUON_RELEASE
@ -114,7 +115,8 @@ for broken_image in "${broken_images[@]}"; do
find "${GLUON_OUTPUTDIR}/images" -iname "${broken_image}" \( -type f -o -type l \) -ls -exec rm -f {} \; find "${GLUON_OUTPUTDIR}/images" -iname "${broken_image}" \( -type f -o -type l \) -ls -exec rm -f {} \;
done done
# Generate the images.list # Generate the images.list
( cd "${GLUON_OUTPUTDIR}/images" && ( find -type f ! -iname '*.manifest' ! -iname images.list; find -type l ! -iname '*.manifest' ) | sed -e 's!^\./\(.*\)$!\1!' -e 's!/! !g' | sort > images.list ) # shellcheck disable=SC2094
( cd "${GLUON_OUTPUTDIR}/images" && ( find . -type f ! -iname '*.manifest' ! -iname images.list; find . -type l ! -iname '*.manifest' ) | sed -e 's!^\./\(.*\)$!\1!' -e 's!/! !g' | sort > images.list )
announce Building manifest... announce Building manifest...
make manifest make manifest
if [ -n "${signature}" ]; then if [ -n "${signature}" ]; then