mirror of
https://github.com/bonfire-networks/bonfire-app.git
synced 2024-05-17 00:22:40 +00:00
29 lines
650 B
Bash
29 lines
650 B
Bash
#!/bin/sh
|
|
# This script is meant to be called by another script defined in each flavour
|
|
# It cycles through a list of extensions (provided in args) and installs their JS deps, if any
|
|
|
|
DEPS=${1}
|
|
|
|
yarn -v || npm -g install yarn || echo "Yarn is required to install JS deps"
|
|
|
|
for dep in $DEPS ; do
|
|
echo "Install JS deps from extension '$dep' with args '$2'"
|
|
|
|
if cd "extensions/$dep/assets" 2>/dev/null ; then
|
|
yarn $2
|
|
cd ../../../
|
|
fi
|
|
|
|
if cd "forks/$dep/assets" 2>/dev/null ; then
|
|
yarn $2
|
|
cd ../../../
|
|
fi
|
|
|
|
if cd "deps/$dep/assets" 2>/dev/null ; then
|
|
yarn $2
|
|
cd ../../../
|
|
else
|
|
echo "The extension '$dep' is not available\n"
|
|
fi
|
|
done
|