43 lines
711 B
Bash
Executable File
43 lines
711 B
Bash
Executable File
#!/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
|
|
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)
|
|
|
|
nimble develop \
|
|
-p:"$WORKSPACE_DIR" \
|
|
--develop-file:"$WORKSPACE_DIR/nimble.develop" \
|
|
"${PROJECT_NAME}"
|
|
|
|
cp scripts/per-project.nimble.develop "$PROJECT_DIR/nimble.develop"
|
|
}
|
|
|
|
for p in $@
|
|
do
|
|
_add_project "$p"
|
|
done
|
|
|
|
for p in $@
|
|
do
|
|
pushd "$(basename $p)"
|
|
nimble setup
|
|
popd
|
|
done
|