Sha256: 163adeaba356967395a2756407560aec1f2e65e3098844809e3c43ddddae6723
Contents?: true
Size: 1.12 KB
Versions: 4
Compression:
Stored size: 1.12 KB
Contents
#!/bin/bash set -e cd "`dirname \"$0\"`/.." if [[ `basename $PWD` == "swagger" ]]; then echo "This command is only used in langauge specific repositories" exit 1 fi # Gets content at $1 and puts it into $2, automatically chmod +x if $2 is the # script dir. get() { curl --fail --silent --show-error $1 > $2 if [[ `dirname $2` == "script" ]]; then chmod +x $2 fi } # Gets a file $1 from the upstream repo and places it in the same location. get_upstream() { get "https://raw.githubusercontent.com/docraptor/docraptor-swagger/master/$1" $1 } # Main entry point, wrapped in a function so that bash can handle replacing # this file while executing it. update() { original=`md5 script/update_from_upstream` get_upstream script/update_from_upstream if [[ `md5 script/update_from_upstream` != "$original" ]]; then echo "Detected updated update_from_upstream command, running again" script/update_from_upstream exit 0 # recursive call above handled everything fi get_upstream docraptor.yaml get_upstream script/swagger script/swagger # download repo, etc. get_upstream script/generate_language } update
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
docraptor-0.3.0 | script/update_from_upstream |
docraptor-0.2.0 | script/update_from_upstream |
docraptor-0.1.0 | script/update_from_upstream |
docraptor-0.0.3 | script/update_from_upstream |