Update PHP libraries in /usr/share/* or /usr/lib/*
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
718 B

#!/bin/sh
set -e
#set -x
if [ ${USER} = "root" ]; then
echo "You can't be root to do this." 1>&2
exit 100
fi
if [ -n "$1" ]; then
COMPJSON=$1
export COMPOSER_ALLOW_SUPERUSER=1
export COMPOSER_HOME="/var/lib/composer/"
export COMPOSER_NO_INTERACTION=1
PROJECT_DIR=$(dirname ${COMPJSON})
APP=$(basename ${PROJECT_DIR})
VENDOR_DIR="/var/lib/composer/$APP"
echo ProjectDir: $PROJECT_DIR VendorDir: $VENDOR_DIR
# composer -q -n -o -a --no-dev update --no-interaction --no-progress --no-scripts -d ${PROJECT_DIR}
composer update --no-interaction --no-scripts -d ${PROJECT_DIR}
ls $VENDOR_DIR/autoload.php
else
echo "please call me with path to composer.json "
fi