forked from Arelle/Arelle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildRedhatDist.sh
51 lines (39 loc) · 1.38 KB
/
buildRedhatDist.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
#!/bin/sh
# this file must have unix newlines (to prevent extraneous errors when running)
# must run sudo on ubuntu
# create version with date and a shell file to name output with the date
PYTHON=/home/hermf/Python39/bin/python3.9
export LD_LIBRARY_PATH=/home/hermf/Python39/lib
$PYTHON buildVersion.py redhat
BUILT64=exe.linux-x86_64-3.9
if [ -d build/${BUILT64} ]
then
rm -fR build/${BUILT64}
fi
mkdir build/${BUILT64}
if [ ! -d dist ]
then
mkdir dist
fi
rm -f dist/arelle-redhat*
# run cx_Freeze setup
$PYTHON setup.py build_exe
cp arelle/scripts-unix/* build/${BUILT64}
# remove .git subdirectories
find build/${BUILT64} -name .git -exec rm -fR {} \;
# copy red hat libraries needed
cp -p /usr/lib64/libexslt.so.0 build/${BUILT64}
cp -p /usr/lib64/libxml2.so build/${BUILT64}
# for some reason redhat needs libxml2.so.2 as well
cp -p /usr/lib64/libxml2.so.2 build/${BUILT64}
cp -p /usr/lib64/libxslt.so.1 build/${BUILT64}
cp -p /lib64/libz.so.1 build/${BUILT64}
cp -pR ${LD_LIBRARY_PATH}/Tktable2.11 build/${BUILT64}
cp -pR ${LD_LIBRARY_PATH}/python3.9/site-packages/mpl_toolkits build/${BUILT64}/lib
cp -pR ${LD_LIBRARY_PATH}/python3.9/site-packages/numpy.libs build/${BUILT64}/lib
cp -pR ${LD_LIBRARY_PATH}/python3.9/site-packages/Pillow.libs build/${BUILT64}/lib
cd build/${BUILT64}
tar -czf ../../dist/${BUILT64}.tgz .
cd ../..
/bin/sh buildRenameLinux-x86_64.sh
# rm -R build2