From 7b3e5f7028a94566d8e4390e0e82996e138ad035 Mon Sep 17 00:00:00 2001 From: flo Date: Thu, 2 Jan 2025 03:24:19 +0100 Subject: [PATCH] info --- info | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 info diff --git a/info b/info new file mode 100755 index 0000000..9e8b9ff --- /dev/null +++ b/info @@ -0,0 +1,18 @@ +#!/bin/bash +ENV_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +CONFIG_FILE="$ENV_DIR/.systems" + +source $ENV_DIR/bin/denv_msg + +# Get (newest) DEV_ENV_PATH +source ~/.profile +denv_info_msg "[dev-env]: $DEV_ENV_PATH" + +# Iterate through all lines in .systems configuration +while IFS=' ' read -r IDENTIFIER DIRECTORY GIT; do + # Skip comments and emtpy lines + if [[ "$IDENTIFIER" =~ ^#.* ]] || [ -z "$IDENTIFIER" ]; then + continue + fi + denv_echo_msg "[$IDENTIFIER]: systems/$DIRECTORY" +done < "$CONFIG_FILE"