Skip to content
Snippets Groups Projects
Commit 55185bc2 authored by dpuzyrkov's avatar dpuzyrkov
Browse files

[+] install_dependencies in debian pre-build, zlib1g-dev in depends.

parent 97321d84
No related branches found
No related tags found
No related merge requests found
PKG_DEPS="libjson-c-dev libsqlite3-dev libmagic-dev libcurl4-gnutls-dev traceroute libpq-dev libzip-dev libz-dev"
PKG_DEPS="libjson-c-dev libsqlite3-dev libmagic-dev libcurl4-gnutls-dev traceroute libpq-dev libzip-dev zlib1g-dev"
#!/bin/bash
#installing required dependencies
check_packages() {
IFS=" "
local PKG_DEPPIES=$(echo $PKG_DEPS | sed 's/\"//g')
for element in "$PKG_DEPPIES"; do
echo "[DEBUGGA] Checking if $element is installed"
if ! dpkg-query -s $element; then
echo "[WRN] Package $element is not installed. Starting installation"
return 1
fi
done
return 0
}
install_dependencies() {
if check_packages; then
echo "[INF] All required packages are installed"
else
echo ""
local PKG_DEPPIES=$(echo $PKG_DEPS | sed 's/\"//g')
echo "[DEBUGGA] Attempting to install $PKG_DEPPIES"
if sudo /usr/bin/apt-get install -y $PKG_DEPPIES ; then
echo ""
echo "[INF] Packages were installed successfully"
else
echo "[ERR] can\'t install required packages. Please, check your package manager"
echo "Aborting"
exit 1
fi
fi
return 0
}
install_dependencies
#. prod_build/general/install_dependencies
. prod_build/general/pre-build.sh #VERSIONS and git
export_variables "prod_build/general/conf/*"
......
......@@ -30,7 +30,7 @@ check_packages() {
install_dependencies() {
if check_packages >> /dev/null; then
if check_packages; then
echo "[INF] All required packages are installed"
else
echo ""
......@@ -69,6 +69,8 @@ install_dependencies() {
#
#}
install_dependencies
#. prod_build/general/install_dependencies
. prod_build/general/pre-build.sh #VERSIONS and git
export_variables "prod_build/general/conf/*"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment