Introducing ID to sz.env load, better handling of truenas specific code

This commit is contained in:
Lockszmith (kateryna) 2024-09-21 14:15:20 -04:00
parent f3bd0e804d
commit 18f047b9ca
5 changed files with 30 additions and 7 deletions

View file

@ -48,11 +48,14 @@ if is_sourced; then
# The following constructs a list of load_next ... commands
ALL_ENV_FILES="$(
find ~/.config/sz.env -xdev -type d -not -name '*.off' \
-exec sh -c '
find "$1" -xdev -maxdepth 1 -type f -name "ID_*.env" | sort
' shell '{}' ';' \
-exec sh -c '
find "$1" -xdev -maxdepth 1 -type f -name "PATH_*.env" | sort
' shell '{}' ';' \
-exec sh -c '
find "$1" -xdev -maxdepth 1 -type f -name "*.env" -not -name "PATH_*" -print | sort
find "$1" -xdev -maxdepth 1 -type f -name "*.env" -not -name "ID_*" -not -name "PATH_*" -print | sort
' shell '{}' ';' \
| sed -e 's/^/load_next "/; s/$/";/'
)"