fixed scripts for dynamic path detection

This commit is contained in:
Boki 2025-06-13 07:44:15 -04:00
parent f2b77f38b4
commit 3227497e45
5 changed files with 67 additions and 10 deletions

View file

@ -118,12 +118,21 @@ done <<< "$lib_dirs"
# Check for environment variable dependencies
echo -e "${BLUE}Checking for hardcoded paths...${NC}"
hardcoded_paths=$(grep -r "g:\\repos\\stock-bot" ./libs 2>/dev/null || true)
if [ -n "$hardcoded_paths" ]; then
hardcoded_paths_win=$(grep -r "g:\\repos\\stock-bot" ./libs 2>/dev/null || true)
hardcoded_paths_unix=$(grep -r "/home/.*/stock-bot" ./libs 2>/dev/null || true)
if [ -n "$hardcoded_paths_win" ]; then
warnings+=("Found hardcoded Windows paths:")
while IFS= read -r line; do
warnings+=(" - $line")
done <<< "$hardcoded_paths"
done <<< "$hardcoded_paths_win"
fi
if [ -n "$hardcoded_paths_unix" ]; then
warnings+=("Found hardcoded Unix paths:")
while IFS= read -r line; do
warnings+=(" - $line")
done <<< "$hardcoded_paths_unix"
fi
# Summary