"Fossies" - the Fresh Open Source Software Archive

Member "motion-Release-4.3.0/scripts/version.sh" (14 Jan 2020, 445 Bytes) of package /linux/misc/motion-Release-4.3.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 BASE_VERSION="4.3.0"
    3 if [ -d .git ]; then
    4     if test "`git diff --name-only`" = "" ; then
    5         GIT_COMMIT="git"
    6     else
    7         GIT_COMMIT="dirty"
    8     fi
    9     GIT_COMMIT=$GIT_COMMIT`git show -s --date=format:'%Y%m%d' --format=%cd-%h` 2>/dev/null
   10     if [ $? -ne 0 ]; then
   11         GIT_COMMIT=$GIT_COMMIT`git show -s --format=%h`
   12     fi
   13 else
   14     GIT_COMMIT="gitUNKNOWN"
   15 fi
   16 printf "$BASE_VERSION"
   17 #printf "$BASE_VERSION+$GIT_COMMIT"
   18