Created
November 20, 2017 18:26
-
-
Save tfogo/68df68a64a08b250d4a741bb111250e4 to your computer and use it in GitHub Desktop.
Little script I made to test class refs in carbon.io
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/sh | |
#set -xv | |
rootdir=`pwd` | |
bold=`tput bold` | |
normal=`tput sgr0` | |
red=`tput setaf 1` | |
green=`tput setaf 2` | |
white=`tput setaf 7` | |
buildRefs() { | |
#echo $1 | |
if [ -d $1/docs/packages ] | |
then | |
#ls -la $1/docs/packages | |
for f in $1/docs/packages/*; | |
do | |
if [ $f != ./docs/packages/carbon-core ] | |
then | |
echo ${white}'\nBuilding class refs for: '${bold}`sed 's/\.\/docs\/packages\///' <<< $f`$normal$red | |
newdir=$rootdir/`sed 's/\.\///' <<< $f` | |
#echo $newdir | |
cd $newdir | |
carbon-jsdoc | |
if [ $? -eq 0 ] | |
then | |
echo '\t'${green}${bold}✓ Success${normal} | |
fi | |
cd $rootdir | |
fi | |
#echo $f | |
buildRefs $f | |
done; | |
fi | |
} | |
buildRefs . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment