Sha256: d129cb1fdaf88c050cae3688f6dd705895ed2597725e886a7e0224cd83c93a9f
Contents?: true
Size: 1.13 KB
Versions: 10
Compression:
Stored size: 1.13 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
10 entries across 10 versions & 1 rubygems