From 92e7f81eb675d517e15278667ea8bf9cdec6e69d Mon Sep 17 00:00:00 2001 From: BenediktMKuehne Date: Thu, 11 Jul 2024 11:55:50 +0000 Subject: [PATCH] add pipfile updater script --- dev-tools/update_pipenv.sh | 31 +++++++++++++++++++++++++++++++ installer.sh | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 dev-tools/update_pipenv.sh diff --git a/dev-tools/update_pipenv.sh b/dev-tools/update_pipenv.sh new file mode 100644 index 00000000..a021d58e --- /dev/null +++ b/dev-tools/update_pipenv.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# EMBArk - The firmware security scanning environment +# +# Copyright 2024 Siemens Energy AG +# +# EMBArk comes with ABSOLUTELY NO WARRANTY. +# +# EMBArk is licensed under MIT +# +# Author(s): Benedikt Kuehne + +# Description: Automates updating the pipfile + + +# 1. find out which installation +local lINSTALL="" + +lINSTALL="deploy" + +if grep -q "EMBARK_INSTALL=dev" ./.env ; then + INSTALL="dev" +fi + +# 2. update pipfile +if [[ lINSTALL == "dev" ]]: + MYSQLCLIENT_LDFLAGS='-L/usr/mysql/lib -lmysqlclient -lssl -lcrypto -lresolv' MYSQLCLIENT_CFLAGS='-I/usr/include/mysql/' PIPENV_VENV_IN_PROJECT=1 pipenv update +else + echo "This is not a developer setup...still trying to update" + pipenv update +fi +# push to web-dir if available \ No newline at end of file diff --git a/installer.sh b/installer.sh index 9f72d44b..c2daf490 100755 --- a/installer.sh +++ b/installer.sh @@ -387,6 +387,7 @@ install_embark_default(){ # write env-vars into ./.env write_env + echo "EMBARK_INSTALL=deploy" > ./.env if [[ "${WSL}" -eq 1 ]]; then check_docker_wsl @@ -468,6 +469,7 @@ install_embark_dev(){ # write env-vars into ./.env write_env + echo "EMBARK_INSTALL=dev" > ./.env chmod 644 .env # download images for container