forked from knowhow/F18_knowhow
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_zip.sh
executable file
·70 lines (51 loc) · 1.5 KB
/
build_zip.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
#!/bin/bash
# https://github.com/$BINTRAY_OWNER/greenbox/blob/apps_modular/upload_app.sh
BINTRAY_OWNER=bringout
BINTRAY_REPOS=F18
BUILD_ARCH=x64
F18_PACKAGE=F18-linux-$BUILD_ARCH
RHEL=0
[ -d /etc/redhat-release ] && RHEL=1
if [[ ! `which curl` ]] ; then
if [ "$RHEL" == "1" ] ; then
sudo yum -y install -y curl
else
sudo apt-get install -y curl
fi
fi
#F18_VERSION=${BUILD_BUILDNUMBER}
F18_VERSION=`echo "const json=require('./package.json') ; console.log(json.f18)" | node`
FILE=${F18_PACKAGE}_${F18_VERSION}.zip
echo "upload: ${F18_PACKAGE} / ${FILE}"
if [[ -z "$HB_ROOT" ]] ; then
export HB_ROOT=$(pwd)/harbour
fi
if ! [[ -f $HB_ROOT/lib/libpq.so ]] ; then
echo $HB_ROOT/lib mora sadrzati .so fajlove
echo HB_ROOT = $HB_ROOT env varijabla nije dobro definisana
exit
fi
cp -av $HB_ROOT/lib/libssl.so .
cp -av $HB_ROOT/lib/libcrypto.so .
cp -av $HB_ROOT/lib/libpq.so .
cp -av $HB_ROOT/lib/libcurl.so .
cp -av $HB_ROOT/lib/libz.so .
cp -av $HB_ROOT/bin/psql .
cp -av $HB_ROOT/bin/pg_dump .
cp -av $HB_ROOT/bin/pg_restore .
cp -av $HB_ROOT/bin/curl .
ln -s libcrypto.so libcrypto.so.1.1
ln -s libssl.so libssl.so.1.1
ln -s libz.so libz.so.1
ln -s libcurl.so libcurl.so.4
FILES="F18-klijent libz.so libssl.so libcrypto.so libpq.so libcurl.so psql pg_dump pg_restore curl"
chmod +x F18-klijent
chmod +x psql
chmod +x pg_dump
chmod +x pg_restore
chmod +x curl
chmod +x libcurl.so
echo "FILE=$FILE FILES=$FILES"
zip -r -v $FILE $FILES
[ ! -f $FILE ] && exit 1
ls -lh $FILE