.
This commit is contained in:
23
process.sh
23
process.sh
@@ -23,25 +23,26 @@ find "$SOURCE_ROOT" -type f \( -name "*.zip" -o -name "*.7z" -o -name "*.rar" \)
|
|||||||
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
|
||||||
|
|
||||||
echo "Extracted to: $temp_dir"
|
echo "Extracted to: $temp_dir"
|
||||||
tree "$temp_dir" # DEBUG
|
tree "$temp_dir" # DEBUG
|
||||||
|
|
||||||
# FILTERING LOGIC
|
# FILTERING LOGIC
|
||||||
find "$temp_dir/$car_name" -not -path "./skins/*/livery.png" \
|
find "$temp_dir/$car_name" -type f \
|
||||||
-not -path "./skins/*/preview.jpg" \
|
-not -path "**/skins/*/livery.png" \
|
||||||
-not -path "./skins/*/preview.jpeg" \
|
-not -path "**/skins/*/preview.jpg" \
|
||||||
-not -path "./skins/*/ui_skin.json" \
|
-not -path "**/skins/*/preview.jpeg" \
|
||||||
-not -path "./ui/badge.png" \
|
-not -name "ui_skin.json" \
|
||||||
-not -path "./ui/ui_car.json" \
|
-not -name "badge.png" \
|
||||||
-not -path "./data.acd" \
|
-not -name "ui_car.json" \
|
||||||
-not -path "./physics/standard/data.acd" \
|
-not -name "data.acd" \
|
||||||
-not -path "./physics/csp/data.acd" \
|
|
||||||
-delete
|
-delete
|
||||||
|
|
||||||
|
find "$temp_dir/$car_name" -type d -empty -delete
|
||||||
|
|
||||||
echo "After filtering:"
|
echo "After filtering:"
|
||||||
tree "$temp_dir"
|
tree "$temp_dir/$car_name"
|
||||||
|
|
||||||
cp -r "$temp_dir/$car_name" "$TARGET_ROOT"
|
cp -r "$temp_dir/$car_name" "$TARGET_ROOT"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user