Fossil SCM

Added extra switch parsing. I still need to figure out how to get switches emitted without using '' around.

brickviking 2024-11-12 09:27 bv-infotool
Commit f127fc531bce7a8b57e603656ae5edf5a720a62ea293f7de0aaea6f03f4ab501
1 file changed +4
--- tools/infoscript.bash
+++ tools/infoscript.bash
@@ -130,10 +130,14 @@
130130
gsed -i -e 's/^##* \([a-z0-9-]\{1,\}\)/@node \1\n@section \1\n/' workfile
131131
fi
132132
133133
# turns --switches into @option{--switches}
134134
sed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile
135
+# now do the same for places where there's -f|--force
136
+sed -i -e 's/|--\([[:alnum:]-]\{1,\}\)/|@option\{--\1\}/g' workfile
137
+# turns -switches into @option{-switches}. Usually starts with space
138
+sed -i -e 's/ -\([[:alnum:]-]\{1,\}\)/ @option\{-\1\}/g' workfile
135139
# ... and adds it to the output file with some space
136140
cat workfile >> fossil.texi
137141
echo "" >> fossil.texi
138142
139143
##### Uncommon commands ####
140144
--- tools/infoscript.bash
+++ tools/infoscript.bash
@@ -130,10 +130,14 @@
130 gsed -i -e 's/^##* \([a-z0-9-]\{1,\}\)/@node \1\n@section \1\n/' workfile
131 fi
132
133 # turns --switches into @option{--switches}
134 sed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile
 
 
 
 
135 # ... and adds it to the output file with some space
136 cat workfile >> fossil.texi
137 echo "" >> fossil.texi
138
139 ##### Uncommon commands ####
140
--- tools/infoscript.bash
+++ tools/infoscript.bash
@@ -130,10 +130,14 @@
130 gsed -i -e 's/^##* \([a-z0-9-]\{1,\}\)/@node \1\n@section \1\n/' workfile
131 fi
132
133 # turns --switches into @option{--switches}
134 sed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile
135 # now do the same for places where there's -f|--force
136 sed -i -e 's/|--\([[:alnum:]-]\{1,\}\)/|@option\{--\1\}/g' workfile
137 # turns -switches into @option{-switches}. Usually starts with space
138 sed -i -e 's/ -\([[:alnum:]-]\{1,\}\)/ @option\{-\1\}/g' workfile
139 # ... and adds it to the output file with some space
140 cat workfile >> fossil.texi
141 echo "" >> fossil.texi
142
143 ##### Uncommon commands ####
144

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button