-
Notifications
You must be signed in to change notification settings - Fork 1
/
collect.sh
72 lines (58 loc) · 1.77 KB
/
collect.sh
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
set -ex
# Disable the aliases from git bash that alter ls output
unalias -a
[ -d ~/output ] && rm -rf ~/output
mkdir ~/output
OS=win
for BIT in 32 64; do
cd ~/IfcOpenShell_$BIT
SHA=$1
branch=$2
override=$3
ARCH=amd64
PY_ARCH=$ARCH
CMAKE_ARCH=x64
INSTALL_ARCH=x64
if [ "$BIT" == "32" ]; then
ARCH=x86
PY_ARCH=win32
CMAKE_ARCH=$ARCH
INSTALL_ARCH=Win32
fi
cd _installed-vs2019-$INSTALL_ARCH/bin
ls | while read exe; do
7z a ${exe:0: -4}-${override}-${SHA:0:7}-${OS}${BIT}.zip $exe
done
mv *.zip ~/output
ls /c/Python/$BIT | while read py_version; do
numbers=`echo $py_version | grep -oE '[0-9]+\.[0-9]+' | tr -d '.'`
py_version_major=python-${numbers}
cd /c/Python/$BIT/$py_version/Lib/site-packages
# might install more python versions then actually being compiled for...
[ -d ifcopenshell ] || continue
[ -d ifcopenshell/__pycache__ ] && rm -rf ifcopenshell/__pycache__
find ifcopenshell -name "*.pyc" -delete
7z a ifcopenshell-${py_version_major}-${override}-${SHA:0:7}-${OS}${BIT}.zip ifcopenshell
mv *.zip ~/output
done
# temporary
# ls /c/Python/$BIT | sort | while read py_version; do
# ls /c/Python/$BIT | sort | tail -n 3 | while read py_version; do
#
# [ -d /c/Python/$BIT/$py_version/Lib/site-packages/ifcopenshell ] || break
#
# [ -d ~/blender ] && rm -rf ~/blender
# mkdir ~/blender
# cd ~/blender
#
# numbers=`echo $py_version | sed s/[^0-9]//g`
# py_version_major=python-${numbers:0:2}
#
# cp -R ~/IfcOpenShell_$BIT/src/ifcblender/io_import_scene_ifc .
# cp -R /c/Python/$BIT/$py_version/Lib/site-packages/ifcopenshell io_import_scene_ifc
# 7z a ifcblender-${py_version_major}-${branch}-${SHA:0:7}-${OS}${BIT}.zip io_import_scene_ifc
#
# mv *.zip ~/output
#
# done
done # for BIT ...