Skip to content

Instantly share code, notes, and snippets.

@GiladShoham
Created December 13, 2018 11:54
Show Gist options
  • Save GiladShoham/ae0a8aaafc627b811c3ba1d2acd99e0c to your computer and use it in GitHub Desktop.
Save GiladShoham/ae0a8aaafc627b811c3ba1d2acd99e0c to your computer and use it in GitHub Desktop.
import all components from a bit scope
scope=$1
if [ -z "$scope" ]
then
echo "please provide scope"
else
components=$(bit ls ${scope} -j | jq -r '.[].id' | sed 's/\[Deprecated]//g')
num_components=$(echo "$components" | wc -w | xargs)
echo "found $num_components in scope $scope"
bit import $components
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment