Browse code

add version to mulle-bootstrap

Nat! authored on 10-10-2015 15:35:08
Showing 2 changed files
... ...
@@ -6,9 +6,10 @@ PROJECT=MulleBootstrap
6 6
 TARGET=mulle-bootstrap
7 7
 HOMEPAGE="http://www.mulle-kybernetik.com/software/git/${TARGET}"
8 8
 DESC="A simple shell script based dependency manager for projects"
9
-VERSION="$1"
9
+
10
+VERSION="${1:-`./mulle-bootstrap version`}"
10 11
 shift
11
-ARCHIVEURL=${1:-"http://www.mulle-kybernetik.com/software/git/mulle-bootstrap/tarball/$VERSION"}
12
+ARCHIVEURL="${1:-http://www.mulle-kybernetik.com/software/git/${TARGET}/tarball/$VERSION}"
12 13
 shift
13 14
 
14 15
 set -e
... ...
@@ -29,6 +29,7 @@
29 29
 #   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 30
 #   POSSIBILITY OF SUCH DAMAGE.
31 31
 
32
+VERSION=0.7
32 33
 
33 34
 #
34 35
 # This is the main user interface to mulle-bootstrap
... ...
@@ -88,7 +89,7 @@ usage()
88 89
 {
89 90
    cat <<EOF
90 91
 usage: mulle-bootstrap [-n][-v|-s] [command] [--help]
91
-       version 0.6
92
+       version ${VERSION}
92 93
 
93 94
  Specify the -h or --help option after each command to get more help.
94 95
 
... ...
@@ -206,6 +207,10 @@ main()
206 207
          mulle-bootstrap-tag.sh "$@" || exit 1
207 208
          ;;
208 209
 
210
+      version)
211
+         echo "${VERSION}" || exit 1
212
+         ;;
213
+
209 214
       *)
210 215
          usage >&2
211 216
          exit 1