.
This commit is contained in:
@@ -64,7 +64,7 @@ jobs:
|
||||
|
||||
- name: Process Archives
|
||||
run: |
|
||||
# 1. Define Paths
|
||||
# Define Paths
|
||||
SOURCE_ROOT="./cars"
|
||||
# This is where the server expects the files
|
||||
DEST_ROOT="./server-data/content/cars"
|
||||
@@ -72,7 +72,7 @@ jobs:
|
||||
|
||||
echo "Searching for archives in $SOURCE_ROOT..."
|
||||
|
||||
# 2. Find all archives recursively (zip, 7z, rar)
|
||||
# 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")
|
||||
@@ -85,15 +85,10 @@ jobs:
|
||||
# Create a temp directory for extraction
|
||||
temp_dir=$(mktemp -d)
|
||||
|
||||
# 3. Extract contents
|
||||
# -y: assume yes on all queries
|
||||
# -o: output directory (no space after -o)
|
||||
|
||||
# Extract contents
|
||||
7z x "$archive" -o"$temp_dir" -y > /dev/null
|
||||
|
||||
# 4. FILTERING LOGIC
|
||||
|
||||
# remove skins that are not livery.png, preview.jpeg, or ui_skin.json
|
||||
# FILTERING LOGIC
|
||||
find "$temp_dir" -type f -not -name "skins/*/livery.png" \
|
||||
-not -name "skins/*/preview.jpeg" \
|
||||
-not -name "skins/*/ui_skin.json" \
|
||||
|
||||
Reference in New Issue
Block a user