This commit is contained in:
2026-02-08 03:20:12 +01:00
parent b52fb310be
commit 440ac6b195

View File

@@ -60,7 +60,7 @@ jobs:
- name: Install 7-Zip
run: |
sudo apt-get update
sudo apt-get install -y p7zip-full
sudo apt-get install -y p7zip-full tree
- name: Process Archives
run: |
@@ -82,22 +82,29 @@ jobs:
echo "--------------------------------------"
echo "Processing: $car_name"
# # Create a temp directory for extraction
# temp_dir=$(mktemp -d)
# 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)
# 7z x "$archive" -o"$temp_dir" -y > /dev/null
# 3. Extract contents
# -y: assume yes on all queries
# -o: output directory (no space after -o)
# # 4. FILTERING LOGIC (The "Server" optimization)
# echo "Cleaning up unnecessary server files..."
7z x "$archive" -o"$temp_dir" -y > /dev/null
# # Remove heavy textures and previews (recursive)
# find "$temp_dir" -type f \( -name "*.png" -o -name "*.jpg" -o -name "*.jpeg" -o -name "*.dds" -o -name "*.kn5" -o -name "*.bmp" \) -delete
# 4. FILTERING LOGIC
# # Remove the 'physics/csp' folder if standard physics are preferred (Optional - comment out if needed)
# # rm -rf "$temp_dir/physics/csp"
# remove skins that are not livery.png, preview.jpeg, or ui_skin.json
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"
# # 5. Move to final Server Directory
# target_dir="$DEST_ROOT/$car_name"