Skip to content

Commit

Permalink
Assuming -h argument, when no argument is given
Browse files Browse the repository at this point in the history
  • Loading branch information
momeni committed Sep 24, 2013
1 parent 7221568 commit d18cb7f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pronounce
Expand Up @@ -75,7 +75,7 @@ function run_external_program {

}

if [ "$1" = "-h" ]; then
function print_usage {
echo -e "Usage: \e[1;33m"
echo -e "\t<word> Plays 1st pronunciation of <word>"
echo -e "\t<word> <num> Plays <num>-th pronunciation of <word>"
Expand All @@ -85,6 +85,9 @@ if [ "$1" = "-h" ]; then
echo -e "\t-v Prints version"
echo -e "\t-h Prints this message"
echo -e "\e[0m"
}
if [ "$1" = "-h" -o "a$1" = "a" ]; then
print_usage
elif [ "$1" = "-c" ]; then
echo "Purging the cache"
rm -f ~/pronunciation.wavs/*
Expand Down

0 comments on commit d18cb7f

Please sign in to comment.