Skip to content

Commit

Permalink
add pipfile updater script
Browse files Browse the repository at this point in the history
  • Loading branch information
BenediktMKuehne committed Jul 11, 2024
1 parent 745dbb4 commit 92e7f81
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
31 changes: 31 additions & 0 deletions dev-tools/update_pipenv.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 92e7f81

Please sign in to comment.