Skip to content
This repository was archived by the owner on Nov 6, 2021. It is now read-only.

Commit 5ef3880

Browse files
author
Florian Horn
committed
Added flag to skip dependency updates on build script
1 parent 2045311 commit 5ef3880

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

build.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ function help () {
139139
-s --src [arg] Source folder.
140140
-d --dest [arg] Target folder.
141141
-t --tmp [arg] Tmp folder.
142+
-u --skip-update Skip dependencies update.
142143
-h --help This page
143144
EOF
144145

@@ -335,6 +336,11 @@ if [[ "${arg_h:?}" = "1" ]]; then
335336
help "Help using ${0}"
336337
fi
337338

339+
# help mode
340+
if [[ "${arg_u:?}" = "1" ]]; then
341+
info "Skipping dependency update"
342+
fi
343+
338344

339345
### Validation. Error out if the things required for your script are not present
340346
##############################################################################
@@ -374,8 +380,10 @@ rm -rf "${DEST}"/*
374380
## Update dependencies
375381
## Based upon PHP 7.0
376382
##
377-
info "UPDATING DEPENDENCIES"
378-
docker run -v "${SRC}":/www -v ~/.composer:/root/.composer --rm danieldent/php-7.1-composer:latest bash -c 'apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng12-dev libxslt-dev && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && docker-php-ext-install gd mcrypt xsl && cd /www && composer update'
383+
if [[ "${arg_u:?}" = "0" ]]; then
384+
info "UPDATING DEPENDENCIES"
385+
docker run -v "${SRC}":/www -v ~/.composer:/root/.composer --rm danieldent/php-7.1-composer:latest bash -c 'apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng12-dev libxslt-dev && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && docker-php-ext-install gd mcrypt xsl && cd /www && composer update'
386+
fi
379387

380388
##
381389
## Prepare important files

0 commit comments

Comments
 (0)