We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b98ca2f commit 8760f2aCopy full SHA for 8760f2a
chd_clean.sh
@@ -35,10 +35,12 @@ for chd_file in *.chd; do
35
# Get the base name of the .chd file without the extension
36
base_name="${chd_file%.chd}"
37
38
- # Find and delete all related files except .chd
+ # Find and delete all related files using wildcards
39
for ext in bin cue iso; do
40
- file="${base_name}.${ext}"
41
- if [ -f "$file" ]; then
+ for file in "${base_name}"*."${ext}"; do
+ # Skip if no matching files are found
42
+ [ -e "$file" ] || continue
43
+
44
if [ "$approve_all" = false ]; then
45
echo "Found: $file. Delete? [y/n/a (approve all)]"
46
read -r response
@@ -63,7 +65,7 @@ for chd_file in *.chd; do
63
65
echo "Deleting $file"
64
66
rm "$file"
67
fi
- fi
68
+ done
69
done
70
71
0 commit comments