Footprint library install script improvements.
* Make WORKING_TREES configurable with an environment variable to simplify external install scripts. * Use native sed functionality rather than grep to find relevant lines in github JSON (grep can create trouble if there is a global --color=always setting, guess how I found out about the color setting)
This commit is contained in:
parent
aaadb40a71
commit
ecb046ad0e
|
@ -24,7 +24,7 @@
|
|||
|
||||
|
||||
# Set where the library repos will go, use a full path
|
||||
WORKING_TREES=~/kicad_sources
|
||||
WORKING_TREES=${WORKING_TREES:-~/kicad_sources}
|
||||
|
||||
|
||||
usage()
|
||||
|
@ -122,10 +122,9 @@ detect_pretty_repos()
|
|||
fi
|
||||
|
||||
# Use github API to list repos for org KiCad, then subset the JSON reply for only
|
||||
# *.pretty repos
|
||||
# *.pretty repos in the "full_name" variable.
|
||||
PRETTY_REPOS=`curl https://api.github.com/orgs/KiCad/repos?per_page=2000 2> /dev/null \
|
||||
| grep full_name | grep pretty \
|
||||
| sed $SED_EREGEXP 's:.+ "KiCad/(.+)",:\1:'`
|
||||
| sed $SED_EREGEXP 's:.+ "full_name".*"KiCad/(.+\.pretty)",:\1:p;d'`
|
||||
|
||||
#echo "PRETTY_REPOS:$PRETTY_REPOS"
|
||||
|
||||
|
|
Loading…
Reference in New Issue