This commit is contained in:
2026-02-08 03:30:24 +01:00
parent c8113a5df7
commit 4830ee7e2d

View File

@@ -49,24 +49,11 @@ jobs:
git lfs install git lfs install
git lfs pull git lfs pull
# - name: Checkout Master Branch (LFS)
# uses: actions/checkout@v4
# with:
# ref: master
# lfs: true
# fetch-depth: 0
# clean: false
- name: Install 7-Zip - name: Install 7-Zip
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y p7zip-full sudo apt-get install -y p7zip-full
# bah
- name: Process Archives - name: Process Archives
run: | run: |
# Define Paths # Define Paths
@@ -80,52 +67,34 @@ jobs:
# 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 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") # Get the filename without extension (e.g., "cars/groupA/my_car.zip" -> "my_car")
filename=$(basename -- "$archive") filename=$(basename -- "$archive")
car_name="${filename%.*}" car_name="${filename%.*}"
echo "--------------------------------------" echo "--------------------------------------"
echo "Processing: $car_name" echo "Processing: $car_name"
# Create a temp directory for extraction # Create a temp directory for extraction
temp_dir=$(mktemp -d) temp_dir=$(mktemp -d)
# Extract contents # Extract contents
7z x "$archive" -o"$temp_dir" -y > /dev/null 7z x "$archive" -o"$temp_dir" -y > /dev/null
# FILTERING LOGIC # FILTERING LOGIC
find "$temp_dir" -type f -not -name "skins/*/livery.png" \ find "$temp_dir" -type f -not -name "skins/*/livery.png" \
-not -name "skins/*/preview.jpeg" \ -not -name "skins/*/preview.jpeg" \
-not -name "skins/*/ui_skin.json" \ -not -name "skins/*/ui_skin.json" \
-not -name "ui/badge.png" \ -not -name "ui/badge.png" \
-not -name "ui/ui_car.json" \ -not -name "ui/ui_car.json" \
-not -name "data.acd" \ -not -name "data.acd" \
-not -name "physics/standard/data.acd" \ -not -name "physics/standard/data.acd" \
-not -name "physics/csp/data.acd" \ -not -name "physics/csp/data.acd" \
-delete -delete
tree "$temp_dir" tree "$temp_dir"
# # 5. Move to final Server Directory # - name: Verify Installation
# target_dir="$DEST_ROOT/$car_name" # run: |
# echo "📁Final Server Directory Structure:"
# # Clean old version if exists # # Show directory tree 3 levels deep to verify structure without spamming files
# if [ -d "$target_dir" ]; then # find ./server-data -maxdepth 3 -not -path '*/.*'
# rm -rf "$target_dir"
# fi
# mkdir -p "$target_dir"
# # Move files
# cp -r "$temp_dir"/* "$target_dir"/
# # Cleanup temp
# rm -rf "$temp_dir"
echo "✅ Installed to: $target_dir"
done
# - name: Verify Installation
# run: |
# echo "📁Final Server Directory Structure:"
# # Show directory tree 3 levels deep to verify structure without spamming files
# find ./server-data -maxdepth 3 -not -path '*/.*'