Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
node-sitefile / tools / update-spec.sh
Size: Mime:

set -e

bin=./node_modules/.bin/nodelib-specs

set -- specs.rst specs-new.rst


$bin --specs rst > $2

diff -bq $1 $2 >/dev/null && {

  echo "No updates"
  exit 0
}

$bin --verify $1 || {
  echo "Error reading specs doc" >&2
  exit 1
}

$bin --verify $2 && {

  rst2pseudoxml.py --exit-status=2 $2 /dev/null && {

    $bin --update $1 $2 && {

      git diff -q $1 && {

        echo "Updated specs doc"
        $bin $1 --refs > spec-index.rst

      } || {
        echo "No updates"
        exit 0
      }
    } || {
      echo "Error updating specs doc" >&2
      exit 1
    }
  } || {
    echo "Invalid rSt produced" >&2
    exit 1
  }
} || {
  echo "Invalid specs doc produced" >&2
  exit 1
}