Skip to content

Commit

Permalink
Explain the complex sed command extracting SHORTNAME (whatwg#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
foolip authored Jun 13, 2020
1 parent b17b0ee commit d0b2192
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions resources.whatwg.org/build/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ set -o nounset
# https://github.com/whatwg/whatwg.org/tree/master/resources.whatwg.org/build.
# See README.md for documentation.

# This extracts the repository name from the remote URL, as the component after the final slash,
# stripping any trailing .git, to be robust against various remote URLs locally and in CI.
SHORTNAME=$(git config --local remote.origin.url | sed -n 's#.*/\([^.]*\)\(\.git\)\?#\1#p')
INPUT_FILE=$(find . -maxdepth 1 -name "*.bs" -print -quit)

Expand Down

0 comments on commit d0b2192

Please sign in to comment.