Something went wrong. Try again.
🎥 Command line media player
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465#!/bin/sh
export LC_ALL=C
version_h="version.h"print=yes
for ac_option do ac_arg=$(echo $ac_option | cut -d '=' -f 2-) case "$ac_option" in --extra=*) extra="-$ac_arg" ;; --versionh=*) version_h="$(pwd)/$ac_arg" print=no ;; --cwd=*) cwd="$ac_arg" ;; *) echo "Unknown parameter: $ac_option" >&2 exit 1 ;;
esacdone
if test "$cwd" ; then cd "$cwd"fi
# Extract revision number from file used by daily tarball snapshots# or from "git describe" outputgit_revision=$(cat snapshot_version 2> /dev/null)test "$git_revision" || test ! -e .git || git_revision="$(git describe \ --match "v[0-9]*" --always --tags --dirty | sed 's/^v//')"version="$git_revision"
# other tarballs extract the version number from the VERSION fileif test ! "$version"; then version="$(cat VERSION 2> /dev/null)"fi
test "$version" || version=UNKNOWN
VERSION="${version}${extra}"
if test "$print" = yes ; then echo "$VERSION" exit 0fi
NEW_REVISION="#define VERSION \"${VERSION}\""OLD_REVISION=$(head -n 1 "$version_h" 2> /dev/null)BUILDDATE="#define BUILDDATE \"$(date)\""
# Update version.h only on revision changes to avoid spurious rebuildsif test "$NEW_REVISION" != "$OLD_REVISION"; then cat <<EOF > "$version_h"$NEW_REVISION$BUILDDATEEOFfi