From 9e08a1e8b8808474a8a47d93fa37dcd4ce47183b Mon Sep 17 00:00:00 2001 From: Leon van Kammen Date: Wed, 18 Dec 2024 19:20:24 +0100 Subject: [PATCH] update .env --- .env | 24 ++++++++++++++---------- .env.leave | 2 -- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.env b/.env index c3548d8..79a35fe 100644 --- a/.env +++ b/.env @@ -1,14 +1,18 @@ -echo '[i] please run 'nix-shell' to install all dependencies [shell.nix]' +test -n "$NIX_SHELL_XRSH" || { -# automatically mirror main between forgejo<->codeberg -git(){ - set -x - test $1 = "push" && test $3 = main && mirror=1 - $(which git) "$@" - test -n "$mirror" && { + # automatically mirror main between forgejo<->codeberg + git(){ set -x - shift ; shift # remove first to args - $(which git) push codeberg "$@" + test $1 = "push" && test $3 = main && mirror=1 + $(which git) "$@" + test -n "$mirror" && { + set -x + shift ; shift # remove first to args + $(which git) push codeberg "$@" + } + set +x } - set +x + + echo '[i] installing nix-shell' && nix-shell + } diff --git a/.env.leave b/.env.leave index 175d777..e69de29 100644 --- a/.env.leave +++ b/.env.leave @@ -1,2 +0,0 @@ -echo '[i] leaving nix-shell environment' -exit