File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -360,6 +360,11 @@ comment_plist () {
360360 COMMENT=$( xmlstarlet sel -t -m " /plist/dict/key[normalize-space(text())='CFBundleDisplayName'][1]" -v " following-sibling::string[1]" -nl -t -m " /plist/dict/key[normalize-space(text())='CFBundleGetInfoString'][1]" -v " following-sibling::string[1]" -nl -t -m " /plist/dict/key[normalize-space(text())='OpenSourceProject'][1]" -v " following-sibling::string[1]" -nl -t -m " /plist/dict/key[normalize-space(text())='Label'][1]" -v " following-sibling::string[1]" -nl -t -m " /plist/dict/key[normalize-space(text())='CFBundleName'][1]" -v " following-sibling::string[1]" -nl -t -m " /plist/dict/key[normalize-space(text())='CFBundleIdentifier'][1]" -v " following-sibling::string[1]" -nl < " $1 " 2> /dev/null | head -1)
361361}
362362
363+ # File type: proto (Protocol Buffers definition)
364+ comment_proto () {
365+ COMMENT=$( sed -En -e ' s/^[[:space:]]*package[[:space:]]+([^ ]*);[[:space:]]*$/\1/p' < " $1 " | head -1)
366+ }
367+
363368# File type: pyproject.toml (Python project definition)
364369comment_pyproject () {
365370 COMMENT=$( sed -En -e ' /^\[project\]$/,/^\[/s/^description *= *"?([^"]*)"? *$/\1/p' < " $1 " | head -1)
@@ -1663,6 +1668,9 @@ for f in "$@" ; do
16631668 * .plist)
16641669 TYPE=plist
16651670 ;;
1671+ * .proto)
1672+ TYPE=proto
1673+ ;;
16661674 * pyproject.toml) TYPE=pyproject
16671675 ;;
16681676 * .rpm)
You can’t perform that action at this time.
0 commit comments