22
22
set -e
23
23
24
24
USAGE=" $( basename " $0 " ) [-h] [-a] ...
25
- This script is used to create the Debian package for to support other additional libraries as separately such as mqtt
25
+ This script is used to create the Debian package for to support other additional libraries as separately such as mqtt, gcp
26
26
27
27
Arguments:
28
28
-h - Display this help text
@@ -94,7 +94,7 @@ arch_name=$(dpkg --print-architecture)
94
94
package_name=" ${pkg_name} -${version} -${architecture} "
95
95
96
96
if [ ! -d " ${archive} /${architecture} " ]; then
97
- mkdir -p " ${archive} /${architecture} / ${package_name} "
97
+ mkdir -p " ${archive} /${architecture} "
98
98
fi
99
99
100
100
# Print the summary of findings
@@ -106,6 +106,9 @@ echo "The package name is : ${package_name}"
106
106
echo
107
107
108
108
echo -n " Populating the package and updating version file..."
109
+ if [ ! -d " ${archive} /${architecture} /${package_name} " ]; then
110
+ mkdir -p " ${archive} /${architecture} /${package_name} "
111
+ fi
109
112
cd " ${archive} /${architecture} /${package_name} "
110
113
mkdir -p DEBIAN
111
114
cp -R ${PKG_ROOT} /packages/DEBIAN/* DEBIAN
@@ -120,6 +123,10 @@ mkdir -p usr/local/lib
120
123
if [ " ${ADDITIONAL_LIB_NAME} " == " mqtt" ]; then
121
124
cp -R --preserve=links /usr/local/lib/libpaho* usr/local/lib
122
125
fi
126
+ if [ " ${ADDITIONAL_LIB_NAME} " == " gcp" ]; then
127
+ cp -R --preserve=links /usr/local/lib/libjwt* usr/local/lib
128
+ cp -R --preserve=links /usr/local/lib/libjansson* usr/local/lib
129
+ fi
123
130
echo " Done."
124
131
125
132
# Build the package
0 commit comments