summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLouie Shprung <lshprung@scu.edu>2022-12-30 10:04:55 -0800
committerLouie Shprung <lshprung@scu.edu>2022-12-30 10:04:55 -0800
commit0569fa14d9bfc07f5fcffebb3c53c3b9aa6a7592 (patch)
treef2c657e04c52909907399552548a7a836dfdd2b1 /src
parent20aa42ad2c7740d64247e900e02638317b650209 (diff)
Package GNU Autoconf Archive
Diffstat (limited to 'src')
-rw-r--r--src/Info.plist4
-rwxr-xr-xsrc/index.sh19
2 files changed, 9 insertions, 14 deletions
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 @@
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
- <string>gnuautoconf</string>
+ <string>gnuautoconfarchive</string>
<key>CFBundleName</key>
- <string>GNU Autoconf</string>
+ <string>GNU Autoconf Archive</string>
<key>DocSetPlatformFamily</key>
<string>autoconf</string>
<key>isDashDocset</key>
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="<title>.*\(Autoconf\).*</title>"
+ PATTERN="<title>.*\(Autoconf Archive\).*</title>"
#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 '&amp' 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() {