first commit

This commit is contained in:
Beyhan Oğur
2026-04-26 21:52:23 +03:00
commit 880f412e2c
2662 changed files with 866266 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Function to extract content from a file
# Usage: get_file_content <file_path>
# Returns the file content with comments removed, or empty string if file doesn't exist
get_file_content() {
if [ -f "$1" ]; then
content=$(cat "$1")
# Skip comments from content
content=$(echo "$content" | grep -v '^<!--' | grep -v '^-->')
# For version files, also trim newlines and whitespace
if [[ "$1" == *"/version" ]]; then
content=$(echo "$content" | tr -d '\n' | xargs)
fi
echo "$content"
else
echo ""
fi
}