- Add joomla_manifest.sh library with manifest parsing functions - Add smoke_test.sh for repository validation - Add versions.sh for version management - Add JSON utilities to common.sh - Fix logging.sh with proper enhanced logging functions - Make all scripts executable Co-authored-by: jmiller-moko <230051081+jmiller-moko@users.noreply.github.com>
27 lines
635 B
Bash
Executable File
27 lines
635 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Detect Windows-style path literals (backslashes) in repository files.
|
|
# Uses git ls-files -z and searches file contents for a literal backslash.
|
|
|
|
hits=()
|
|
while IFS= read -r -d '' f; do
|
|
# Skip common binary files by mime-type
|
|
if file --brief --mime-type "$f" | grep -qE '^(application|audio|image|video)/'; then
|
|
continue
|
|
fi
|
|
if grep -F $'\\' -- "$f" >/dev/null 2>&1; then
|
|
hits+=("$f")
|
|
fi
|
|
done < <(git ls-files -z)
|
|
|
|
if [ "${#hits[@]}" -gt 0 ]; then
|
|
echo "ERROR: windows_path_literal_detected"
|
|
for h in "${hits[@]}"; do
|
|
echo " - ${h}"
|
|
done
|
|
exit 2
|
|
fi
|
|
|
|
echo "paths: ok"
|