From 23fd40689c6aad5c2a9b0921e16e044b0ba2a6ab Mon Sep 17 00:00:00 2001 From: Enrico204 Date: Tue, 10 Oct 2023 16:45:28 +0200 Subject: [PATCH] feat: Make install_dependencies.sh script more robust This commit modifies the dependencies installer script to make it more robust, meaning that it works even when invoked from other directories than `scripts/`. --- scripts/install_dependencies.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/install_dependencies.sh b/scripts/install_dependencies.sh index 82ef584..b85ea79 100755 --- a/scripts/install_dependencies.sh +++ b/scripts/install_dependencies.sh @@ -1,12 +1,23 @@ -#!/bin/bash -pushd ../ +#!/usr/bin/env bash +set -Eeuo pipefail + +__script_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) +readonly __script_dir + +pushd "$__script_dir/../" + pushd packages/paperless_api flutter packages pub get dart run build_runner build --delete-conflicting-outputs popd + pushd packages/mock_server flutter packages pub get popd + flutter packages pub get flutter gen-l10n dart run build_runner build --delete-conflicting-outputs + +popd +