Mercurial > hg > config
annotate bin/joke.sh @ 490:67404c3a4d75
python/hgrc.py
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sat, 10 Aug 2013 23:05:05 -0700 |
parents | c7dd4631b526 |
children |
rev | line source |
---|---|
248
c7dd4631b526
adding a module for easy jokes; should go -> bitsyapps, etc
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
1 #!/bin/bash |
c7dd4631b526
adding a module for easy jokes; should go -> bitsyapps, etc
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
2 |
c7dd4631b526
adding a module for easy jokes; should go -> bitsyapps, etc
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
3 title=$1 |
c7dd4631b526
adding a module for easy jokes; should go -> bitsyapps, etc
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
4 shift |
c7dd4631b526
adding a module for easy jokes; should go -> bitsyapps, etc
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
5 |
c7dd4631b526
adding a module for easy jokes; should go -> bitsyapps, etc
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
6 if [[ "${title}" == "" || "$#" == "0" ]] |
c7dd4631b526
adding a module for easy jokes; should go -> bitsyapps, etc
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
7 then |
c7dd4631b526
adding a module for easy jokes; should go -> bitsyapps, etc
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
8 exit 1 |
c7dd4631b526
adding a module for easy jokes; should go -> bitsyapps, etc
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
9 fi |
c7dd4631b526
adding a module for easy jokes; should go -> bitsyapps, etc
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
10 |
c7dd4631b526
adding a module for easy jokes; should go -> bitsyapps, etc
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
11 filename=~/web/site/comedy/cheapshots/${title}.txt |
c7dd4631b526
adding a module for easy jokes; should go -> bitsyapps, etc
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
12 |
c7dd4631b526
adding a module for easy jokes; should go -> bitsyapps, etc
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
13 echo "$@" > ${filename} |