refactor: fixed deprecated write_file to use table instead of string for

each language in templates.projects
This commit is contained in:
DarthMooMancer
2025-05-12 00:41:05 -04:00
parent 677e5bbc67
commit 4ecaf54f82
7 changed files with 103 additions and 106 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Start from the current directory
DIR="$(pwd)"
# Walk up until we find a marker or reach root
while [[ ! -f "$DIR/CMakeLists.txt" && \
! -f "$DIR/package.json" && \
! -d "$DIR/.git" && \
"$DIR" != "/" ]]; do
DIR="$(dirname "$DIR")"
done
# Check if root was reached without finding anything
if [[ "$DIR" == "/" ]]; then
echo "❌ Project root not found."
exit 1
fi
echo "$DIR"