3 # Copyright (C) The Arvados Authors. All rights reserved.
5 # SPDX-License-Identifier: Apache-2.0
7 if [[ "$1" == "" ]]; then
8 echo "Syntax: $0 <package=version> [package=version] [gem:package=version] ..."
12 if [[ "$@" =~ "arvados-workbench=" ]] || [[ "$@" =~ "arvados-api-server=" ]]; then
13 RESET_NGINX_DAEMON_FLAG=true
15 RESET_NGINX_DAEMON_FLAG=false
21 if [[ "$var" =~ "gem:" ]]; then
29 if [[ "$RESET_NGINX_DAEMON_FLAG" == true ]]; then
30 # our packages restart nginx; with the 'daemon off' flag in place,
31 # that makes package install hang. Arguably we shouldn't be restarting nginx on install.
32 sed -i 's/daemon off;/#daemon off;/' /etc/nginx/nginx.conf
35 if [[ "$debs" != "" ]]; then
36 apt-get -qqy --allow-downgrades install $debs
37 if [[ "$?" != "0" ]]; then
38 # Maybe we need to update the apt cache first?
40 apt-get -qqy --allow-downgrades install $debs
44 if [[ "$gems" != "" ]]; then
47 gem install ${arr[0]} -v ${arr[1]} --no-rdoc --no-ri
51 if [[ "$RESET_NGINX_DAEMON_FLAG" == true ]]; then
52 /etc/init.d/nginx stop
53 sed -i 's/#daemon off;/daemon off;/' /etc/nginx/nginx.conf