From 0569fa14d9bfc07f5fcffebb3c53c3b9aa6a7592 Mon Sep 17 00:00:00 2001 From: Louie Shprung Date: Fri, 30 Dec 2022 10:04:55 -0800 Subject: Package GNU Autoconf Archive --- src/Info.plist | 4 ++-- src/index.sh | 19 +++++++------------ 2 files changed, 9 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/Info.plist b/src/Info.plist index 2850204..6289fc8 100644 --- a/src/Info.plist +++ b/src/Info.plist @@ -3,9 +3,9 @@ CFBundleIdentifier - gnuautoconf + gnuautoconfarchive CFBundleName - GNU Autoconf + GNU Autoconf Archive DocSetPlatformFamily autoconf isDashDocset diff --git a/src/index.sh b/src/index.sh index e81a0f7..4d4b12b 100755 --- a/src/index.sh +++ b/src/index.sh @@ -6,14 +6,14 @@ shift get_title() { FILE="$1" - PATTERN=".*\(Autoconf\).*" + PATTERN=".*\(Autoconf Archive\).*" #Find pattern in file grep -Eo "$PATTERN" "$FILE" | #Remove tag sed 's/<[^>]*>//g' | \ #Remove '(automake)' - sed 's/(Autoconf)//g' | \ + sed 's/(Autoconf Archive)//g' | \ #Remove trailing space sed 's/[ ]*$//g' | \ #Replace '&' with '&' @@ -23,17 +23,12 @@ get_title() { } get_type() { - FILE="$1" - PATTERN="The node you are looking for is at.*Limitations-of-.*\.html;Builtin - The node you are looking for is at;Macro" + FILE="$(basename $1)" + MACRO_PATTERN="^ax_" - echo "$PATTERN" | while read -r line; do - #echo "$line" - if grep -Eq "$(echo "$line" | cut -d ';' -f 1)" "$FILE"; then - echo "$line" | cut -d ';' -f 2 - break - fi - done + if echo "$FILE" | grep -q "$MACRO_PATTERN"; then + echo "Macro" + fi } insert() { -- cgit