Skip to content
Snippets Groups Projects
Commit 5fcc93c6 authored by Amorilia's avatar Amorilia
Browse files

Updated makeconfig script for git.

parent a2c60fef
No related branches found
No related tags found
No related merge requests found
......@@ -42,10 +42,17 @@
#define NIFTOOLS_REVISION "$WCREV$"
#define NIFTOOLS_REVISION_INT $WCREV$
#define NIFTOOLS_SVN_VERSION "$WCMODS?Modified:Not modified$"
// NIFTOOLS_SVN_VERSION kept for compatibility
#define NIFTOOLS_SVN_VERSION "Not modified"
#define NIFTOOLS_SVN_DATE "$WCDATE$"
#define NIFTOOLS_SVN_RANGE "$WCRANGE$"
#define NIFTOOLS_SVN_MIXED "$WCMIXED?Mixed revision WC:Not mixed$"
// NIFTOOLS_SVN_RANGE kept, and defined as WCREV, for compatibility
#define NIFTOOLS_SVN_RANGE "$WCREV$"
// NIFTOOLS_SVN_MIXED kept for compatibility
#define NIFTOOLS_SVN_MIXED "Not mixed"
#define NIFTOOLS_SVN_URL "$WCURL$"
#endif
@echo off
rem Quick script to create config.h
IF EXIST "%PROGRAMFILES%\TortoiseSVN\bin\SubWCRev.exe" (
"%PROGRAMFILES%\TortoiseSVN\bin\SubWCRev.exe" . NifCommon\config.h.in NifCommon\config.h > nul 2<&1
)
#!/bin/bash
# Quick script to create config.h
WCREV=`git log -1 --pretty=format:%h`
WCDATE=`git log -1 --pretty=format:%cd`
WCURL=`git config --get remote.origin.url`
cat NifCommon/config.h.in | sed "s/[$]WCREV[$]/$WCREV/g" | sed "s/[$]WCDATE[$]/$WCDATE/g" | sed "s![$]WCURL[$]!$WCURL!g" > NifCommon/config.h
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment