Fossil SCM
Tweaks to makeinfo script.
Commit
7bd0ad7a81d60aa8152342045753058558d5cc0d125fc567deb6c63068f5ccb7
Parent
f60a7ed29171903…
1 file changed
+3
-13
+3
-13
| --- tools/fossil-makeinfo | ||
| +++ tools/fossil-makeinfo | ||
| @@ -171,22 +171,22 @@ | ||
| 171 | 171 | printf "@menu\n" >> fossil.texi |
| 172 | 172 | |
| 173 | 173 | # Slurp in Common keywords from fossil help |
| 174 | 174 | # WARNING: tail count is brittle |
| 175 | 175 | echo "Grab common keywords for menu" |
| 176 | -for u in $(for t in $(fossil help | tail -n +4| sed '$d'); do echo "$t"; done | sort); do echo "* ${u}::"; done >> fossil.texi | |
| 176 | +for u in $(for t in $(fossil help | tail -n +11| sed '$d'); do echo "$t"; done | sort); do echo "* ${u}::"; done >> fossil.texi | |
| 177 | 177 | |
| 178 | 178 | # Add end menu, add some space too |
| 179 | 179 | printf "@end menu |
| 180 | 180 | |
| 181 | 181 | " >> fossil.texi |
| 182 | 182 | |
| 183 | 183 | # Add in the actual help for common commands |
| 184 | 184 | # WARNING: tail count is brittle |
| 185 | -# tail command pops off the first six lines, sed commands remove the last two lines. | |
| 185 | +# tail command pops off the first fourteen lines, sed commands remove the last two lines. | |
| 186 | 186 | echo "Fossil output common help to workfile" |
| 187 | -fossil help -v | tail -n +7 | sed '$d' | sed '$d' >workfile | |
| 187 | +fossil help -v | tail -n +14 | sed '$d' | sed '$d' >workfile | |
| 188 | 188 | |
| 189 | 189 | # swap out @ with @@ so texinfo doesn't barf |
| 190 | 190 | echo "Doubling up the @'s" |
| 191 | 191 | sed -i -e 's/@/@@/g' workfile |
| 192 | 192 | |
| @@ -203,12 +203,10 @@ | ||
| 203 | 203 | else |
| 204 | 204 | # We'll assume we're on a BSD here, even though this won't always be true |
| 205 | 205 | gsed -i -e 's/^##* \([a-z0-9-]\{1,\}\)/@node \1\n@section \1\n/' workfile |
| 206 | 206 | fi |
| 207 | 207 | |
| 208 | -# adds linebreak to texinfo output per option line. These start with four spaces. | |
| 209 | -sed -i -e 's/^ /@*/' workfile | |
| 210 | 208 | # turns --switches into @option{--switches} |
| 211 | 209 | sed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile |
| 212 | 210 | # now do the same for places where there's -f|--force |
| 213 | 211 | sed -i -e 's/|--\([[:alnum:]-]\{1,\}\)/|@option\{--\1\}/g' workfile |
| 214 | 212 | # turns -switches into @option{-switches}. Usually starts with space |
| @@ -262,12 +260,10 @@ | ||
| 262 | 260 | else |
| 263 | 261 | # We'll assume we're on a BSD here, even though this won't always be true |
| 264 | 262 | gsed -i -e 's/^##* \([a-z0-9-]\{1,\}\)/@node \1\n@section \1\n/' workfile |
| 265 | 263 | fi |
| 266 | 264 | |
| 267 | -# adds linebreak to texinfo output per option line. These start with four spaces. | |
| 268 | -sed -i -e 's/^ /@*/' workfile | |
| 269 | 265 | # turns --switches into @option{--switches} |
| 270 | 266 | sed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile |
| 271 | 267 | |
| 272 | 268 | # ... and adds it to the output file with a spacer line |
| 273 | 269 | cat workfile >> fossil.texi |
| @@ -322,12 +318,10 @@ | ||
| 322 | 318 | else |
| 323 | 319 | # We'll assume we're on a BSD here, even though this won't always be true |
| 324 | 320 | gsed -i -e 's/^##* \([a-z0-9-]\{1,\}\)/@node \1\n@section \1\n/' workfile |
| 325 | 321 | fi |
| 326 | 322 | |
| 327 | -# adds linebreak to texinfo output per option line. These start with four spaces. | |
| 328 | -sed -i -e 's/^ /@*/' workfile | |
| 329 | 323 | # turns --switches into @option{--switches} |
| 330 | 324 | sed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile |
| 331 | 325 | |
| 332 | 326 | # ... and adds it to the output file with a spacer line |
| 333 | 327 | cat workfile >> fossil.texi |
| @@ -396,12 +390,10 @@ | ||
| 396 | 390 | sed -i -e 's/{/@{/g' -e 's/}/@}/g' workfile |
| 397 | 391 | else |
| 398 | 392 | gsed -i -e 's/\{/@\{/g' -e 's/\}/@\}/g' workfile |
| 399 | 393 | fi |
| 400 | 394 | |
| 401 | -# adds linebreak to texinfo output per option line. These start with four spaces. | |
| 402 | -sed -i -e 's/^ /@*/' workfile | |
| 403 | 395 | echo "Swapping out --switches for @option{--switches}" |
| 404 | 396 | # turns --switches into @option{--switches} |
| 405 | 397 | if [[ ${MYOS} == "Linux" ]]; then |
| 406 | 398 | sed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile |
| 407 | 399 | else |
| @@ -458,7 +450,5 @@ | ||
| 458 | 450 | # makeinfo fossil.texi |
| 459 | 451 | |
| 460 | 452 | echo "Done ... for now. Please check fossil.texi file over for inconsistencies, and fill in descriptions." |
| 461 | 453 | echo "Once everything's good, you can run your system's makeinfo command to turn" |
| 462 | 454 | echo "your .texi file into a .info file to install where you need." |
| 463 | - | |
| 464 | - | |
| 465 | 455 |
| --- tools/fossil-makeinfo | |
| +++ tools/fossil-makeinfo | |
| @@ -171,22 +171,22 @@ | |
| 171 | printf "@menu\n" >> fossil.texi |
| 172 | |
| 173 | # Slurp in Common keywords from fossil help |
| 174 | # WARNING: tail count is brittle |
| 175 | echo "Grab common keywords for menu" |
| 176 | for u in $(for t in $(fossil help | tail -n +4| sed '$d'); do echo "$t"; done | sort); do echo "* ${u}::"; done >> fossil.texi |
| 177 | |
| 178 | # Add end menu, add some space too |
| 179 | printf "@end menu |
| 180 | |
| 181 | " >> fossil.texi |
| 182 | |
| 183 | # Add in the actual help for common commands |
| 184 | # WARNING: tail count is brittle |
| 185 | # tail command pops off the first six lines, sed commands remove the last two lines. |
| 186 | echo "Fossil output common help to workfile" |
| 187 | fossil help -v | tail -n +7 | sed '$d' | sed '$d' >workfile |
| 188 | |
| 189 | # swap out @ with @@ so texinfo doesn't barf |
| 190 | echo "Doubling up the @'s" |
| 191 | sed -i -e 's/@/@@/g' workfile |
| 192 | |
| @@ -203,12 +203,10 @@ | |
| 203 | else |
| 204 | # We'll assume we're on a BSD here, even though this won't always be true |
| 205 | gsed -i -e 's/^##* \([a-z0-9-]\{1,\}\)/@node \1\n@section \1\n/' workfile |
| 206 | fi |
| 207 | |
| 208 | # adds linebreak to texinfo output per option line. These start with four spaces. |
| 209 | sed -i -e 's/^ /@*/' workfile |
| 210 | # turns --switches into @option{--switches} |
| 211 | sed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile |
| 212 | # now do the same for places where there's -f|--force |
| 213 | sed -i -e 's/|--\([[:alnum:]-]\{1,\}\)/|@option\{--\1\}/g' workfile |
| 214 | # turns -switches into @option{-switches}. Usually starts with space |
| @@ -262,12 +260,10 @@ | |
| 262 | else |
| 263 | # We'll assume we're on a BSD here, even though this won't always be true |
| 264 | gsed -i -e 's/^##* \([a-z0-9-]\{1,\}\)/@node \1\n@section \1\n/' workfile |
| 265 | fi |
| 266 | |
| 267 | # adds linebreak to texinfo output per option line. These start with four spaces. |
| 268 | sed -i -e 's/^ /@*/' workfile |
| 269 | # turns --switches into @option{--switches} |
| 270 | sed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile |
| 271 | |
| 272 | # ... and adds it to the output file with a spacer line |
| 273 | cat workfile >> fossil.texi |
| @@ -322,12 +318,10 @@ | |
| 322 | else |
| 323 | # We'll assume we're on a BSD here, even though this won't always be true |
| 324 | gsed -i -e 's/^##* \([a-z0-9-]\{1,\}\)/@node \1\n@section \1\n/' workfile |
| 325 | fi |
| 326 | |
| 327 | # adds linebreak to texinfo output per option line. These start with four spaces. |
| 328 | sed -i -e 's/^ /@*/' workfile |
| 329 | # turns --switches into @option{--switches} |
| 330 | sed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile |
| 331 | |
| 332 | # ... and adds it to the output file with a spacer line |
| 333 | cat workfile >> fossil.texi |
| @@ -396,12 +390,10 @@ | |
| 396 | sed -i -e 's/{/@{/g' -e 's/}/@}/g' workfile |
| 397 | else |
| 398 | gsed -i -e 's/\{/@\{/g' -e 's/\}/@\}/g' workfile |
| 399 | fi |
| 400 | |
| 401 | # adds linebreak to texinfo output per option line. These start with four spaces. |
| 402 | sed -i -e 's/^ /@*/' workfile |
| 403 | echo "Swapping out --switches for @option{--switches}" |
| 404 | # turns --switches into @option{--switches} |
| 405 | if [[ ${MYOS} == "Linux" ]]; then |
| 406 | sed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile |
| 407 | else |
| @@ -458,7 +450,5 @@ | |
| 458 | # makeinfo fossil.texi |
| 459 | |
| 460 | echo "Done ... for now. Please check fossil.texi file over for inconsistencies, and fill in descriptions." |
| 461 | echo "Once everything's good, you can run your system's makeinfo command to turn" |
| 462 | echo "your .texi file into a .info file to install where you need." |
| 463 | |
| 464 | |
| 465 |
| --- tools/fossil-makeinfo | |
| +++ tools/fossil-makeinfo | |
| @@ -171,22 +171,22 @@ | |
| 171 | printf "@menu\n" >> fossil.texi |
| 172 | |
| 173 | # Slurp in Common keywords from fossil help |
| 174 | # WARNING: tail count is brittle |
| 175 | echo "Grab common keywords for menu" |
| 176 | for u in $(for t in $(fossil help | tail -n +11| sed '$d'); do echo "$t"; done | sort); do echo "* ${u}::"; done >> fossil.texi |
| 177 | |
| 178 | # Add end menu, add some space too |
| 179 | printf "@end menu |
| 180 | |
| 181 | " >> fossil.texi |
| 182 | |
| 183 | # Add in the actual help for common commands |
| 184 | # WARNING: tail count is brittle |
| 185 | # tail command pops off the first fourteen lines, sed commands remove the last two lines. |
| 186 | echo "Fossil output common help to workfile" |
| 187 | fossil help -v | tail -n +14 | sed '$d' | sed '$d' >workfile |
| 188 | |
| 189 | # swap out @ with @@ so texinfo doesn't barf |
| 190 | echo "Doubling up the @'s" |
| 191 | sed -i -e 's/@/@@/g' workfile |
| 192 | |
| @@ -203,12 +203,10 @@ | |
| 203 | else |
| 204 | # We'll assume we're on a BSD here, even though this won't always be true |
| 205 | gsed -i -e 's/^##* \([a-z0-9-]\{1,\}\)/@node \1\n@section \1\n/' workfile |
| 206 | fi |
| 207 | |
| 208 | # turns --switches into @option{--switches} |
| 209 | sed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile |
| 210 | # now do the same for places where there's -f|--force |
| 211 | sed -i -e 's/|--\([[:alnum:]-]\{1,\}\)/|@option\{--\1\}/g' workfile |
| 212 | # turns -switches into @option{-switches}. Usually starts with space |
| @@ -262,12 +260,10 @@ | |
| 260 | else |
| 261 | # We'll assume we're on a BSD here, even though this won't always be true |
| 262 | gsed -i -e 's/^##* \([a-z0-9-]\{1,\}\)/@node \1\n@section \1\n/' workfile |
| 263 | fi |
| 264 | |
| 265 | # turns --switches into @option{--switches} |
| 266 | sed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile |
| 267 | |
| 268 | # ... and adds it to the output file with a spacer line |
| 269 | cat workfile >> fossil.texi |
| @@ -322,12 +318,10 @@ | |
| 318 | else |
| 319 | # We'll assume we're on a BSD here, even though this won't always be true |
| 320 | gsed -i -e 's/^##* \([a-z0-9-]\{1,\}\)/@node \1\n@section \1\n/' workfile |
| 321 | fi |
| 322 | |
| 323 | # turns --switches into @option{--switches} |
| 324 | sed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile |
| 325 | |
| 326 | # ... and adds it to the output file with a spacer line |
| 327 | cat workfile >> fossil.texi |
| @@ -396,12 +390,10 @@ | |
| 390 | sed -i -e 's/{/@{/g' -e 's/}/@}/g' workfile |
| 391 | else |
| 392 | gsed -i -e 's/\{/@\{/g' -e 's/\}/@\}/g' workfile |
| 393 | fi |
| 394 | |
| 395 | echo "Swapping out --switches for @option{--switches}" |
| 396 | # turns --switches into @option{--switches} |
| 397 | if [[ ${MYOS} == "Linux" ]]; then |
| 398 | sed -i -e 's/--\([[:alnum:]-]\{1,\}\)/@option\{--\1\}/g' workfile |
| 399 | else |
| @@ -458,7 +450,5 @@ | |
| 450 | # makeinfo fossil.texi |
| 451 | |
| 452 | echo "Done ... for now. Please check fossil.texi file over for inconsistencies, and fill in descriptions." |
| 453 | echo "Once everything's good, you can run your system's makeinfo command to turn" |
| 454 | echo "your .texi file into a .info file to install where you need." |
| 455 |