nim-workplace/scripts/add-project

43 lines
711 B
Plaintext
Raw Normal View History

#!/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)
nimble develop \
-p:"$WORKSPACE_DIR" \
--develop-file:"$WORKSPACE_DIR/nimble.develop" \
2022-07-04 13:28:07 +00:00
"${PROJECT_NAME}"
2022-07-04 12:16:20 +00:00
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