Skip to content

Commit

Permalink
Ensure dependencies file exists and fail otherwise
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernricks committed Jan 23, 2025
1 parent 0667c9d commit 2bf5b25
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/install-dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#!/bin/sh
#!/bin/bash
# This script installs gvm-libs dependencies
set -e

BASEDIR=$(dirname $0)
BASEDIR=$(dirname "$0")
DEFAULT_DEPENDENCIES_FILE="$BASEDIR/build-dependencies.list"
DEPENDENCIES_FILE=${1:-$DEFAULT_DEPENDENCIES_FILE}

if [[ ! -f "$DEPENDENCIES_FILE" ]]; then
echo "Dependencies file not found: $DEPENDENCIES_FILE"
exit 1
fi

apt-get update && \
apt-get install -y --no-install-recommends --no-install-suggests \
$(cat $DEPENDENCIES_FILE | grep -v '#') \
$(grep -v '#' "$DEPENDENCIES_FILE")

0 comments on commit 2bf5b25

Please sign in to comment.