bin/bootstrap-test-env
#!/usr/bin/env bash
: <<'COPYRIGHT'
Copyright (c) Vaimo Group. All rights reserved.
See LICENSE_VAIMO.txt for license details.
COPYRIGHT
# Setup sandbox
name='composer-patches'
rm -rf test/modules/${name} 2>/dev/null
mkdir -p test/modules/${name} 2>/dev/null
if [ ! -L test/modules/${name}/src ] ; then
ln -s $(cd src &>/dev/null && pwd) test/modules/${name}/src 2>/dev/null
fi
cp composer.json test/modules/${name} 2>/dev/null
sed -i.org 's|'${name}'"|'${name}'-local"|g' test/modules/${name}/composer.json
rm test/modules/${name}/composer.json.org 2>/dev/null
exit 0