2021-12-21 17:15:17 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
if [[ -z "$1" ]]
|
|
|
|
then
|
|
|
|
echo "Please specify a project name to clone (e.g. nimbus-eth2)"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")"
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
WORKSPACE_DIR=$(pwd)
|
|
|
|
|
|
|
|
function _add_project {
|
|
|
|
PROJECT_NAME=$1
|
2022-07-04 12:16:20 +00:00
|
|
|
if ! git ls-remote "$PROJECT_NAME" > /dev/null 2>&1; then
|
|
|
|
PROJECT_NAME="https://github.com/status-im/$PROJECT_NAME"
|
|
|
|
fi
|
|
|
|
|
|
|
|
PROJECT_DIR=$(basename $PROJECT_NAME)
|
2021-12-21 17:15:17 +00:00
|
|
|
|
|
|
|
nimble develop \
|
|
|
|
-p:"$WORKSPACE_DIR" \
|
|
|
|
--develop-file:"$WORKSPACE_DIR/nimble.develop" \
|
2022-07-04 13:28:07 +00:00
|
|
|
"${PROJECT_NAME}"
|
2021-12-21 17:15:17 +00:00
|
|
|
|
2022-07-04 12:16:20 +00:00
|
|
|
cp scripts/per-project.nimble.develop "$PROJECT_DIR/nimble.develop"
|
2021-12-21 17:15:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
for p in $@
|
|
|
|
do
|
|
|
|
_add_project "$p"
|
|
|
|
done
|
2022-04-17 10:06:42 +00:00
|
|
|
|
|
|
|
for p in $@
|
|
|
|
do
|
2022-08-26 15:54:04 +00:00
|
|
|
pushd "$(basename $p)"
|
2022-04-17 10:06:42 +00:00
|
|
|
nimble setup
|
|
|
|
popd
|
|
|
|
done
|