Annotation of qemu/roms/seabios/tools/buildversion.sh, revision 1.1.1.1

1.1       root        1: #!/bin/sh
                      2: # Script to generate a C file with version information.
                      3: OUTFILE="$1"
                      4: VAR16MODE="$2"
                      5: 
                      6: # Extract version info
                      7: if [ -d .git ]; then
                      8:     VERSION="`git describe --tags --long --dirty`"
                      9: elif [ -f .version ]; then
                     10:     VERSION="`cat .version`"
                     11: else
                     12:     VERSION="?"
                     13: fi
                     14: VERSION="${VERSION}-`date +"%Y%m%d_%H%M%S"`-`hostname`"
                     15: echo "Version: ${VERSION}"
                     16: 
                     17: # Build header file
                     18: if [ "$VAR16MODE" == "VAR16" ]; then
                     19:     cat > ${OUTFILE} <<EOF
                     20: #include "types.h"
                     21: char VERSION[] VAR16 = "${VERSION}";
                     22: EOF
                     23: else
                     24:     cat > ${OUTFILE} <<EOF
                     25: char VERSION[] = "${VERSION}";
                     26: EOF
                     27: fi

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.