Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:leibing
xnedit
generate_version.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File generate_version.sh of Package xnedit
#!/bin/bash LANG=C export LANG XNEDIT_RELEASE_DATE=`date +'%b %e, %Y'` XNEDIT_VERSION="XNEdit release of $XNEDIT_RELEASE_DATE" XNEDIT_GIT_DEF= # read release info from obsinfo info=../xnedit.obsinfo if [ -f "$info" ]; then read dummy VERSION < <(grep ^version: $info) read dummy REV_LONG < <(grep ^commit: $info) read dummy MTIME < <(grep ^mtime: $info) XNEDIT_VERSION="XNEdit $VERSION ${REV_LONG:0:7} $(date -d @$MTIME +'%Y-%m-%d')" XNEDIT_GIT_DEF="#define XNEDIT_GIT_REV" fi # this script can generate a header file, if a filename is provided if [ ! -z "$1" ]; then cat > .version.h << __EOF__ /* auto-generated by generate_version.sh */ $XNEDIT_GIT_DEF #define XNEDIT_VERSION "$XNEDIT_VERSION" __EOF__ # don't refresh the file, if it hasn't changed if [ -f "$1" ]; then diff $1 .version.h > /dev/null 2>&1 if [ $? -ne 0 ]; then echo "generate $1" cp -f .version.h $1 fi else echo "generate $1" cp -f .version.h $1 fi rm -f .version.h else # script called by doc makefile echo $XNEDIT_VERSION fi
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor