Skip to content

Commit

Permalink
scripts/sscce.sh: default to short; add -l for long
Browse files Browse the repository at this point in the history
  • Loading branch information
jleffler committed Feb 20, 2020
1 parent 0ff520b commit 2489449
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions src/scripts/sscce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,38 @@
#
# Analog to WSO for SSCCE and MCVE (and HTAQTSW)

usage()
{
echo "Usage: $(basename $0 .sh) [-l]" >&2
exit 1
}

long=no
while getopts l arg
do
case "$arg" in
(l) long=yes;;
(*) usage;;
esac
done

shift $(($OPTIND - 1))
if [ $# != 0 ]
then usage
fi

echo 'MCVE ([Minimal, Complete, Verifiable Example](https://stackoverflow.com/help/mcve))'
echo '(or MRE or whatever name SO now uses)'

# Verified http not https 2019-05-15
echo 'or an'
echo 'SSCCE ([Short, Self-Contained, Correct Example](http://sscce.org/)).'

# Verified http not https 2019-05-15
echo 'See also'
echo '[How to Ask Questions the Smart Way](http://www.catb.org/~esr/faqs/smart-questions.html)'

#echo 'and [Writing the perfect question](http://tinyurl.com/stack-hints)'
echo 'and [Writing the perfect question](https://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/)'
if [ "$long" = "yes" ]
then
# Verified http not https 2019-05-15
echo 'See also'
echo '[How to Ask Questions the Smart Way](http://www.catb.org/~esr/faqs/smart-questions.html)'
#echo 'and [Writing the perfect question](http://tinyurl.com/stack-hints)'
echo 'and [Writing the perfect question](https://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/)'
fi

0 comments on commit 2489449

Please sign in to comment.