Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a Makefile to generate the readme.rst and usage.rst files from the application output.
- Loading branch information
Showing
7 changed files
with
840 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
all: usage readme | ||
|
||
HELP: | ||
echo 'Running ``$ smap -h`` will give::' > HELP | ||
echo >> HELP | ||
smap -h | sed -e 's/^/ /' >> HELP | ||
|
||
HELP_NEW: | ||
echo 'Running ``$ smap new -h`` will give::' > HELP_NEW | ||
echo >> HELP_NEW | ||
smap new -h | sed -e 's/^/ /' >> HELP_NEW | ||
|
||
HELP_UPDATE: | ||
echo 'Running ``$ smap update -h`` will give::' > HELP_UPDATE | ||
echo >> HELP_UPDATE | ||
smap update -h | sed -e 's/^/ /' >> HELP_UPDATE | ||
|
||
HELP_CHECK: | ||
echo 'Running ``$ smap check -h`` will give::' > HELP_CHECK | ||
echo >> HELP_CHECK | ||
smap check -h | sed -e 's/^/ /' >> HELP_CHECK | ||
|
||
usage: HELP HELP_NEW HELP_UPDATE HELP_CHECK | ||
cp templates/usage.template usage.rst | ||
sed -e '/HELP_PLACEHOLDER/ {' -e 'r HELP' -e 'd' -e '}' -i usage.rst | ||
sed -e '/HELP_UPDATE_PLACEHOLDER/ {' -e 'r HELP_UPDATE' -e 'd' -e '}' -i usage.rst | ||
sed -e '/HELP_NEW_PLACEHOLDER/ {' -e 'r HELP_NEW' -e 'd' -e '}' -i usage.rst | ||
sed -e '/HELP_CHECK_PLACEHOLDER/ {' -e 'r HELP_CHECK' -e 'd' -e '}' -i usage.rst | ||
|
||
readme: HELP HELP_NEW HELP_UPDATE HELP_CHECK | ||
cp templates/readme.template readme.rst | ||
sed -e '/HELP_PLACEHOLDER/ {' -e 'r HELP' -e 'd' -e '}' -i readme.rst | ||
sed -e '/HELP_UPDATE_PLACEHOLDER/ {' -e 'r HELP_UPDATE' -e 'd' -e '}' -i readme.rst | ||
sed -e '/HELP_NEW_PLACEHOLDER/ {' -e 'r HELP_NEW' -e 'd' -e '}' -i readme.rst | ||
sed -e '/HELP_CHECK_PLACEHOLDER/ {' -e 'r HELP_CHECK' -e 'd' -e '}' -i readme.rst | ||
|
||
.PHONY: clean | ||
|
||
clean: | ||
rm -rf HELP HELP_NEW HELP_UPDATE HELP_CHECK | ||
|
Oops, something went wrong.