diff --git a/bin/build-debian.sh b/bin/build-debian.sh index 7f246ade3..03918fc0f 100755 --- a/bin/build-debian.sh +++ b/bin/build-debian.sh @@ -1,5 +1,10 @@ #!/usr/bin/env bash +if ! command -v dpkg-deb &> /dev/null; then + echo "Missing command: dpkg-deb" + exit 1 +fi + echo "Packaging debian x64 distribution..." VERSION=`jq -r ".version" package.json` diff --git a/bin/build-linux-x64.sh b/bin/build-linux-x64.sh index 888720a19..fd5b02dda 100755 --- a/bin/build-linux-x64.sh +++ b/bin/build-linux-x64.sh @@ -1,5 +1,20 @@ #!/usr/bin/env bash +if ! command -v jq &> /dev/null; then + echo "Missing command: jq" + exit 1 +fi + +if ! command -v fakeroot &> /dev/null; then + echo "Missing command: fakeroot" + exit 1 +fi + +if ! command -v dpkg-deb &> /dev/null; then + echo "Missing command: dpkg-deb" + exit 1 +fi + SRC_DIR=./dist/trilium-linux-x64-src [ "$1" != "DONTCOPY" ] && ./bin/copy-trilium.sh "$SRC_DIR" diff --git a/bin/build-win-x64.sh b/bin/build-win-x64.sh index 37bc28137..ad359ccb6 100755 --- a/bin/build-win-x64.sh +++ b/bin/build-win-x64.sh @@ -1,5 +1,10 @@ #!/usr/bin/env bash +if ! command -v wine &> /dev/null; then + echo "Missing command: wine" + exit 1 +fi + SRC_DIR=./dist/trilium-windows-x64-src if [ "$1" != "DONTCOPY" ] diff --git a/bin/build.sh b/bin/build.sh index 6092b2011..6a738f1a5 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -1,5 +1,27 @@ #!/usr/bin/env bash +set -e + +if ! command -v jq &> /dev/null; then + echo "Missing command: jq" + exit 1 +fi + +if ! command -v fakeroot &> /dev/null; then + echo "Missing command: fakeroot" + exit 1 +fi + +if ! command -v dpkg-deb &> /dev/null; then + echo "Missing command: dpkg-deb" + exit 1 +fi + +if ! command -v wine &> /dev/null; then + echo "Missing command: wine" + exit 1 +fi + echo "Deleting existing builds" rm -rf dist/*