diff options
| author | iceyrazor <iceyrazor@mailfence.com> | 2025-05-25 04:42:09 -0500 |
|---|---|---|
| committer | iceyrazor <iceyrazor@mailfence.com> | 2025-05-25 04:42:09 -0500 |
| commit | 5f802a4a9d5e013429f9af6f887278ea6db5e18b (patch) | |
| tree | 37d1b6b8951f44524dfaba081477d53d302dba97 /runs | |
| parent | 90248ad8222cf99d5a8ef7e1f2816d3ee810d3b8 (diff) | |
made dynamic generating path.
Diffstat (limited to 'runs')
| -rwxr-xr-x | runs/env.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/runs/env.sh b/runs/env.sh index 5f5466e..6f0b267 100755 --- a/runs/env.sh +++ b/runs/env.sh @@ -4,4 +4,26 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" echo DEPLOYING FILES cp -r $script_dir/../env/. "$DEV_ENV" [ -d "$script_dir/../env_private/env/" ] && cp -r $script_dir/../env_private/env/. "$DEV_ENV" + +path_dirs="$(find $DEV_ENV/.local/bin/scripts -type d)" + +if [ ! -f "/etc/profile" ]; then + echo NO /etc/profile + echo SKIPPING SETTING \$PATH +else + export PATH="" + source /etc/profile + paths="$PATH" + path_dirs="$path_dirs +$(find ~/stuff/scripts/**/theme-setter -maxdepth 0 -type d) +$(find ~/stuff/scripts/**/youtube-playlist-cli -maxdepth 0 -type d) +$(find ~/stuff/scripts/system -maxdepth 2 -type d)" + for s in $path_dirs; do + echo "adding $s to path" + paths="$paths:$s" + done + echo "export PATH=\"$paths\":" > "$DEV_ENV/.local/bin/system/paths.sh" + chmod u+x "$DEV_ENV/.local/bin/system/paths.sh" + +fi echo ----------------- |
