add convenience script

This commit is contained in:
2026-02-08 14:13:30 +01:00
parent 4830ee7e2d
commit fa2c33693d
2 changed files with 49 additions and 36 deletions

View File

@@ -56,42 +56,8 @@ jobs:
- name: Process Archives
run: |
# Define Paths
SOURCE_ROOT="./cars"
# This is where the server expects the files
DEST_ROOT="./server-data/content/cars"
mkdir -p "$DEST_ROOT"
echo "Searching for archives in $SOURCE_ROOT..."
# Find all archives recursively (zip, 7z, rar)
find "$SOURCE_ROOT" -type f \( -name "*.zip" -o -name "*.7z" -o -name "*.rar" \) | while read archive; do
# Get the filename without extension (e.g., "cars/groupA/my_car.zip" -> "my_car")
filename=$(basename -- "$archive")
car_name="${filename%.*}"
echo "--------------------------------------"
echo "Processing: $car_name"
# Create a temp directory for extraction
temp_dir=$(mktemp -d)
# Extract contents
7z x "$archive" -o"$temp_dir" -y > /dev/null
# FILTERING LOGIC
find "$temp_dir" -type f -not -name "skins/*/livery.png" \
-not -name "skins/*/preview.jpeg" \
-not -name "skins/*/ui_skin.json" \
-not -name "ui/badge.png" \
-not -name "ui/ui_car.json" \
-not -name "data.acd" \
-not -name "physics/standard/data.acd" \
-not -name "physics/csp/data.acd" \
-delete
tree "$temp_dir"
chmod +x process.sh
./process.sh
# - name: Verify Installation
# run: |