Skip to content
Snippets Groups Projects
Select Git revision
  • f7a0a77eb0390291d6043d085a996f2f4ba4cb59
  • master default protected
  • Binary
  • add-version-information
  • os-path-join
  • develop-GA
  • timeFstatmap
  • add-higher-spindown-components
  • develop-DK
  • adds-header-to-grid-search
  • v1.3
  • v1.2
  • v1.1.2
  • v1.1.0
  • v1.0.1
15 results

semi_coherent_glitch_search_using_MCMC.py

Blame
  • Forked from Gregory Ashton / PyFstat
    Source project has a limited visibility.
    • Gregory Ashton's avatar
      89f200ed
      Renames sftfilepath -> sftfilepattern · 89f200ed
      Gregory Ashton authored
      This renames the input sftfilepath to sftfilepattern and adds
      documentation on how that should be used, i.e. a colon separated list of
      wildstring or exact matches. In globbing for all matches, the colon
      split is added in. sftfilepath is still used by `Writer` since
      an exact path is known.
      89f200ed
      History
      Renames sftfilepath -> sftfilepattern
      Gregory Ashton authored
      This renames the input sftfilepath to sftfilepattern and adds
      documentation on how that should be used, i.e. a colon separated list of
      wildstring or exact matches. In globbing for all matches, the colon
      split is added in. sftfilepath is still used by `Writer` since
      an exact path is known.
    generate_svn_version.sh 2.05 KiB
    #!/usr/bin/env bash
    
    HEADER="svn_version.h"
    TMPFILE="$HEADER.tmp"
    
    echo "#ifndef SVN_VERSION_H" > $TMPFILE
    echo "#define SVN_VERSION_H" >> $TMPFILE
    echo "" >> $TMPFILE
    
    if [ -d .git/svn ]; then
        CMD="git svn info"
    elif [ -d .git ]; then
        GIT_LOG=`git log -n1 --pretty="format:%H"`
        HOST=`hostname`
        BRANCH=`git branch | sed -n 's/^\* *//p'`
        remote=`git config --get branch.$BRANCH.remote 2>/dev/null`
        if [ "$?" != "0" ]; then
            remote="origin"
        fi
        URL=`git config --get remote.$remote.url`
        DATE=`git log -n1 --pretty="format:%ct"`
    elif [ -d .svn ]; then
        CMD="svn info"
    else
        CMD=""
    fi
    
    if [ "x$GIT_LOG" != "x" ]; then
        echo "#define SVN_VERSION \"$GIT_LOG [$URL] ($HOST:$PWD [$BRANCH])\"" >> $TMPFILE
        echo "$GIT_LOG" | sed 's/^\(........\).*/#define GIT_REVISION 0x\1/' >> $TMPFILE
        echo "#define GIT_DATE $DATE" >> $TMPFILE
        test "x$URL" = "x" ||
            echo "$URL" |
                sed 's/.git$//;s%.*://%%;s/[^/]*@//;s/[^a-zA-Z0-9]/_/g;s/__*/_/g;
                     y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/;
                     s/^/#define REPOSITORY_/;s/$/ 1/' >> $TMPFILE
    elif [ "x$CMD" != "x" ]; then
        LANG=C
        URL=`$CMD | awk '
                    /^URL/ { url = $2; };
                    /^Rev/ { rev = $2; };
                    END { print "#define SVN_VERSION \"Repository: " url \
                                " Revision: " rev "\"" >> "'"$TMPFILE"'";
                          print "#define SVN_REPOSITORY \"" url "\"" >> "'"$TMPFILE"'";
                          print "#define SVN_REVISION " rev >> "'"$TMPFILE"'";
                          print url };'`
        echo $URL |
            sed 's%.*://%%;s/[^/]*@//;s/[^a-zA-Z0-9]/_/g;s/__*/_/g;
                 y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/;
                 s/^/#define REPOSITORY_/;s/$/ 1/' >> $TMPFILE
    else
        echo "#include \"version.h\"" >> $TMPFILE
        echo "#define SVN_VERSION BOINC_VERSION_STRING" >> $TMPFILE
    fi
    
    echo "" >> $TMPFILE
    echo "#endif" >> $TMPFILE
    
    if cmp "$HEADER" "$TMPFILE" >/dev/null 2>&1; then
    	rm -f "$TMPFILE"
    else
    	mv "$TMPFILE" "$HEADER"
    fi