-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathprepare_release.sh
More file actions
43 lines (39 loc) · 802 Bytes
/
Copy pathprepare_release.sh
File metadata and controls
43 lines (39 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
ARCHIVE_DIR="$HOME/Library/Developer/Xcode/Archives"
file_exclusion_array=(
"constants.py"
"external_class_template.txt"
"fileimporter.py"
"generator.py"
"instantiator.py"
"instantiator_template.txt"
"internal_class_template.txt"
"modelgen-swift.py"
"nil_serialization_template.txt"
"openstep_parser"
"validator.py"
"pbxproj"
)
array_contains ()
{
local array="$1[@]"
local seeking=$2
local in=1
for element in "${!array}"; do
if [[ $element == $seeking ]]; then
in=0
break
fi
done
return $in
}
find $ARCHIVE_DIR -name 'JSONModelKit.framework' | while read line;
do
for i in $(ls "$line/")
do
if array_contains file_exclusion_array $i; then
echo "Deleting file $i"
rm -f -r "$line/$i"
fi
done
done