From 5fbf7d9b4cfb1f13f53fd9a90e20273fea778048 Mon Sep 17 00:00:00 2001 From: Hannes Date: Tue, 25 Jun 2024 21:39:02 +0200 Subject: [PATCH] zess: change env var to export in dev script --- dev.sh | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/dev.sh b/dev.sh index 4a5229e..68b1c8e 100755 --- a/dev.sh +++ b/dev.sh @@ -1,20 +1,7 @@ -#!/bin/sh +#!/usr/bin/env bash # Current user - -UID=$(id -u):$(id -g) - -# Exit function - -ctrl_c() { - echo "-------------------------------------" - echo "Stopping all containers..." - echo "-------------------------------------" - CURRENT_UID=$UID docker-compose -f docker-compose.yml down - exit 0 -} - -trap ctrl_c INT +export CURRENT_UID=$(id -u):$(id -g) # Parse input @@ -50,8 +37,7 @@ if [ ! -f vinvoor/.env ]; then fi # Start the docker containers - -CURRENT_UID=$UID docker-compose -f docker-compose.yml up -d +docker-compose -f docker-compose.yml up -d echo "-------------------------------------" echo "Following logs..." @@ -66,4 +52,4 @@ else docker-compose -f docker-compose.yml logs -f zess-backend zess-frontend fi -CURRENT_UID=$UID docker-compose -f docker-compose.yml down +docker-compose -f docker-compose.yml down