#!/bin/bash # This script provides a 'nimble install' like interface for the nimbus build system. # # Usage: # ./namble.sd # # # The script # - accesses https://nimble.directory/ # - extracts the / from the project directory # - invokes add_submodule. # Check if a pkg argument was provided if [ -z "$1" ]; then echo "Usage: $0 " exit 1 fi SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ADD_SCRIPT="$SCRIPT_DIR/vendor/nimbus-build-system/scripts/add_submodule.sh" echo "$ADD_SCRIPT" echo "Fetching nimble package $1" URL="https://nimble.directory/pkg/$1" auth_pkg=$(curl -s "$URL" \ | grep -o '

" exit 1 fi echo Found "<$auth_pkg>" $ADD_SCRIPT $auth_pkg make update