Commit 6271c6f20ec12cd937e003cb5f6c49bfef777282
Made the usage screen a little more verbose
| | | | 80 | } | 80 | } |
---|
81 | | 81 | |
---|
82 | usage() { | 82 | usage() { |
---|
83 | echo "Usage is $0 --name <name of the project>" | | echo "Usage is $0 --name <name of the project>" |
---|
| | 83 | echo " " | | | 84 | echo "Usage: " |
---|
| | 85 | echo "$0 --name <name of the project> : Create new trac project" |
---|
| | 86 | echo "$0 --help : Show this help" |
---|
| | 87 | echo " " |
---|
| | 88 | echo "-------" |
---|
| | 89 | echo "Trac Tools v0.1 (CC-SA) Servelots. 2013." |
---|
84 | } | 90 | } |
---|
85 | | 91 | |
---|
86 | setup() { | 92 | setup() { |
---|
… | | … | |
---|
101 | elif [ "$1" == "--name" ]; then | 101 | elif [ "$1" == "--name" ]; then |
---|
102 | project=$2 | 102 | project=$2 |
---|
103 | if [ -z $project ]; then | 103 | if [ -z $project ]; then |
---|
104 | echo "You have to give a project name. Please see --help." | | echo "You have to give a project name. Please see --help." |
---|
| | 104 | echo "Please specify a project name." | | | 105 | usage |
---|
105 | exit 1; | 106 | exit 1; |
---|
106 | fi | 107 | fi |
---|
107 | readConfig | 108 | readConfig |
---|
108 | setup | 109 | setup |
---|
109 | else | 110 | else |
---|
110 | echo "Invalid option. Please see --help." | | echo "Invalid option. Please see --help." |
---|
| | 111 | echo "Invalid option." | | | 112 | usage |
---|
111 | exit 1; | 113 | exit 1; |
---|
112 | fi | 114 | fi |
---|