summaryrefslogtreecommitdiffstats
path: root/TOOLS/osxbundle/version.sh
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2012-08-13 12:08:22 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2012-10-16 07:15:12 +0200
commitc4f68de1456ddb561f322b84e2ba1b790eec4c28 (patch)
treec5d9c9ae8e3be85edbbef4bdd0fe4324d601ad68 /TOOLS/osxbundle/version.sh
parent6557f206efeb4569a42f1e4810172bc97fd64619 (diff)
downloadmpv-c4f68de1456ddb561f322b84e2ba1b790eec4c28.tar.bz2
mpv-c4f68de1456ddb561f322b84e2ba1b790eec4c28.tar.xz
TOOLS: add script for osx bundle generation
Add a make task and python script to create a Mac OS X Application Bundle to be used when compiling with the --enable-macosx-finder and --enable-macosx-bundle configure flags. The main svg icon was created by me and heavily inspired by Apple's iTunes and AppStore icon designs. We are still looking for something better. For the audio, movie and subtitles icons I added the main logo to MPlayer OSX Extended icons. Use with `make osxbundle` after running configure and make.
Diffstat (limited to 'TOOLS/osxbundle/version.sh')
-rwxr-xr-xTOOLS/osxbundle/version.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/TOOLS/osxbundle/version.sh b/TOOLS/osxbundle/version.sh
new file mode 100755
index 0000000000..ff6bb1b5fd
--- /dev/null
+++ b/TOOLS/osxbundle/version.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Extract revision number from file used by daily tarball snapshots
+# or from "git describe" output
+git_revision=$(cat snapshot_version 2> /dev/null)
+test $git_revision || test ! -d .git || \
+git_revision=`git describe --match "v[0-9]*" --always`
+git_revision=$(expr "$git_revision" : v*'\(.*\)')
+test $git_revision || git_revision=UNKNOWN
+
+# releases extract the version number from the VERSION file
+version=$(cat VERSION 2> /dev/null)
+test $version || version=$git_revision
+
+echo $version