Last active
September 8, 2020 11:32
-
-
Save chee/f4560c9c2c6d7b0948c68d2f6a812138 to your computer and use it in GitHub Desktop.
Install all active origami projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# dependencies: npm, jq, git | |
origami_root="$HOME/projects/origami" | |
echo "Making origami directory at $origami_root" | |
mkdir -p $origami_root/components | |
clone() { | |
dirname="$1" | |
if [[ "$1" == o-* ]]; then | |
dirname="components/${1##o-}" | |
elif [[ "$1" == origami-* ]]; then | |
dirname="${dirname##origami-}" | |
fi | |
echo "installing '$1' at $origami_root/$dirname" | |
git clone --recursive [email protected]:Financial-Times/"$1".git "$origami_root/$dirname" | |
} | |
npm install -g git+https://git.snoot.club/chee/repo-data-cli.git | |
for name in $(origami-repo-data list repos '{status: "active"}' | jq '.[].name' -r); do | |
clone $name; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment