mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-02-23 06:38:24 +00:00
fix script
This commit is contained in:
parent
8d32488eb7
commit
f3e6968a1b
@ -10,6 +10,7 @@ set -o errtrace -o errexit -o nounset -o pipefail
|
||||
# Define directories
|
||||
src_dir="src"
|
||||
spiffui_dir="src/a-spiffui-v3"
|
||||
ignored_dir="src/a-spiffui-v2"
|
||||
|
||||
# Ensure both directories exist
|
||||
if [[ ! -d "$src_dir" || ! -d "$spiffui_dir" ]]; then
|
||||
@ -17,8 +18,8 @@ if [[ ! -d "$src_dir" || ! -d "$spiffui_dir" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# List files in src (up to max depth 10)
|
||||
src_files=$(find "$src_dir" -mindepth 1 -maxdepth 10 -type f)
|
||||
# List files in src (up to max depth 10), excluding src/a-spiffui-v2 and src/a-spiffui-v3
|
||||
src_files=$(find "$src_dir" -mindepth 1 -maxdepth 10 -type f ! -path "$ignored_dir/*" ! -path "$spiffui_dir/*")
|
||||
|
||||
# Find files in src that are not in src/a-spiffui-v3
|
||||
missing_files=()
|
||||
@ -30,7 +31,10 @@ for file in $src_files; do
|
||||
done
|
||||
|
||||
# Output the result
|
||||
if [[ ${#missing_files[@]} -eq 0 ]]; then
|
||||
found_count=$(echo "$src_files" | wc -l)
|
||||
missing_count=${#missing_files[@]}
|
||||
|
||||
if [[ $missing_count -eq 0 ]]; then
|
||||
echo "All files in '$src_dir' are present in '$spiffui_dir'."
|
||||
else
|
||||
echo "Files in '$src_dir' but not in '$spiffui_dir':"
|
||||
@ -38,3 +42,7 @@ else
|
||||
echo "$file"
|
||||
done
|
||||
fi
|
||||
|
||||
# Summary
|
||||
echo "Total files checked: $found_count"
|
||||
echo "Total missing files: $missing_count"
|
||||
|
Loading…
x
Reference in New Issue
Block a user