Download data/gitTools/copyright from introvoyz045/COPASI: direct link, hf CLI and curl.
- Browser
- Download file 6.26 kB
-
https://huggingface.co/datasets/introvoyz045/COPASI/resolve/main/data/gitTools/copyright
- Command line
-
hf download hf://datasets/introvoyz045/COPASI/data/gitTools/copyright
-
curl -L -o copyright https://huggingface.co/datasets/introvoyz045/COPASI/resolve/main/data/gitTools/copyright
6.26 kB
| . "$(git rev-parse --show-toplevel)/gitTools/functions" | |
| CommentStart=`getAttribute CommentStart $1` | |
| if [ _$CommentStart == _unspecified -o \ | |
| _$CommentStart == _unset -o \ | |
| _$CommentStart == _set ]; then | |
| cat | |
| exit | |
| fi | |
| GAWK=`gitTool gawk` | |
| if [ _"$GAWK" == _ ]; then | |
| cat | |
| exit | |
| fi | |
| Date=`date -u +%Y` | |
| # LastCommit=`git log -1 --date=short --pretty=format:"%ad" $1` | |
| # LastCommit=(${LastCommit//-/ }) | |
| # LastCommit=${LastCommit[0]} | |
| # if [ _${LastCommit} == _${Date} -a \ | |
| # `git log -1 --pretty=%at -- $1` -gt ${GitStart} ]; then | |
| # cat | |
| # exit; | |
| # fi | |
| LastCommit=${Date} | |
| FirstCommit=`git log --reverse --date=short --pretty=format:"%ad" $1 | head -n 1` | |
| FirstCommit=(${FirstCommit//-/ }) | |
| FirstCommit=${FirstCommit[0]} | |
| FirstCommit=${FirstCommit:-$Date} | |
| CommentEnd=`getAttribute CommentEnd $1` | |
| if [ _$CommentEnd == _unspecified -o \ | |
| _$CommentEnd == _unset -o \ | |
| _$CommentEnd == _set ]; then | |
| CommentEnd= | |
| fi | |
| PrologEnd=`getAttribute PrologEnd $1` | |
| if [ _$PrologEnd == _unspecified -o \ | |
| _$PrologEnd == _unset -o \ | |
| _$PrologEnd == _set -o \ | |
| _$PrologEnd == _ ]; then | |
| PrologEnd=0 | |
| fi | |
| function clean () { | |
| $GAWK -- ' | |
| BEGIN { | |
| Copyright = 0 | |
| Prolog = "'$PrologEnd'" | |
| Skip = 0 | |
| } | |
| function printCopyright(FirstCommit, LastCommit) | |
| { | |
| while (LastCommit != 0) { | |
| if (LastCommit <= 2007) { | |
| if (FirstCommit != LastCommit) { | |
| printf "'$CommentStart' Copyright (C) %d - %d by Pedro Mendes, Virginia Tech Intellectual '$CommentEnd'\n", FirstCommit, LastCommit | |
| } else { | |
| printf "'$CommentStart' Copyright (C) %d by Pedro Mendes, Virginia Tech Intellectual '$CommentEnd'\n", FirstCommit | |
| } | |
| printf "'$CommentStart' Properties, Inc. and EML Research, gGmbH. '$CommentEnd'\n" | |
| printf "'$CommentStart' All rights reserved. '$CommentEnd'\n" | |
| printf "\n" | |
| break; | |
| } else if (LastCommit <= 2009) { | |
| if (LastCommit == 2008 || FirstCommit == LastCommit) { | |
| printf "'$CommentStart' Copyright (C) %d by Pedro Mendes, Virginia Tech Intellectual '$CommentEnd'\n", LastCommit | |
| } else if (FirstCommit < 2008) { | |
| printf "'$CommentStart' Copyright (C) 2008 - %d by Pedro Mendes, Virginia Tech Intellectual '$CommentEnd'\n", LastCommit | |
| } else { | |
| printf "'$CommentStart' Copyright (C) %d - %d by Pedro Mendes, Virginia Tech Intellectual '$CommentEnd'\n", FirstCommit, LastCommit | |
| } | |
| printf "'$CommentStart' Properties, Inc., EML Research, gGmbH, University of Heidelberg, '$CommentEnd'\n" | |
| printf "'$CommentStart' and The University of Manchester. '$CommentEnd'\n" | |
| printf "'$CommentStart' All rights reserved. '$CommentEnd'\n" | |
| printf "\n" | |
| if (FirstCommit >= 2008) { | |
| break | |
| } else { | |
| LastCommit = 2007 | |
| } | |
| } else if (LastCommit <= 2016) { | |
| if (LastCommit == 2010 || FirstCommit == LastCommit) { | |
| printf "'$CommentStart' Copyright (C) %d by Pedro Mendes, Virginia Tech Intellectual '$CommentEnd'\n", LastCommit | |
| } else if (FirstCommit < 2010) { | |
| printf "'$CommentStart' Copyright (C) 2010 - %d by Pedro Mendes, Virginia Tech Intellectual '$CommentEnd'\n", LastCommit | |
| } else { | |
| printf "'$CommentStart' Copyright (C) %d - %d by Pedro Mendes, Virginia Tech Intellectual '$CommentEnd'\n", FirstCommit, LastCommit | |
| } | |
| printf "'$CommentStart' Properties, Inc., University of Heidelberg, and The University '$CommentEnd'\n" | |
| printf "'$CommentStart' of Manchester. '$CommentEnd'\n" | |
| printf "'$CommentStart' All rights reserved. '$CommentEnd'\n" | |
| printf "\n" | |
| if (FirstCommit >= 2010) { | |
| break | |
| } else { | |
| LastCommit = 2009 | |
| } | |
| } else if (LastCommit <= 2018) { | |
| if (LastCommit == 2017 || FirstCommit == LastCommit) { | |
| printf "'$CommentStart' Copyright (C) %d by Pedro Mendes, Virginia Tech Intellectual '$CommentEnd'\n", LastCommit | |
| } else if (FirstCommit < 2017) { | |
| printf "'$CommentStart' Copyright (C) 2017 - %d by Pedro Mendes, Virginia Tech Intellectual '$CommentEnd'\n", LastCommit | |
| } else { | |
| printf "'$CommentStart' Copyright (C) %d - %d by Pedro Mendes, Virginia Tech Intellectual '$CommentEnd'\n", FirstCommit, LastCommit | |
| } | |
| printf "'$CommentStart' Properties, Inc., University of Heidelberg, and University of '$CommentEnd'\n" | |
| printf "'$CommentStart' of Connecticut School of Medicine. '$CommentEnd'\n" | |
| printf "'$CommentStart' All rights reserved. '$CommentEnd'\n" | |
| printf "\n" | |
| if (FirstCommit >= 2017) { | |
| break | |
| } else { | |
| LastCommit = 2016 | |
| } | |
| } else { | |
| if (LastCommit == 2019 || FirstCommit == LastCommit) { | |
| printf "'$CommentStart' Copyright (C) %d by Pedro Mendes, Rector and Visitors of the '$CommentEnd'\n", LastCommit | |
| } else if (FirstCommit < 2019) { | |
| printf "'$CommentStart' Copyright (C) 2019 - %d by Pedro Mendes, Rector and Visitors of the '$CommentEnd'\n", LastCommit | |
| } else { | |
| printf "'$CommentStart' Copyright (C) %d - %d by Pedro Mendes, Rector and Visitors of the '$CommentEnd'\n", FirstCommit, LastCommit | |
| } | |
| printf "'$CommentStart' University of Virginia, University of Heidelberg, and University '$CommentEnd'\n" | |
| printf "'$CommentStart' of Connecticut School of Medicine. '$CommentEnd'\n" | |
| printf "'$CommentStart' All rights reserved. '$CommentEnd'\n" | |
| printf "\n" | |
| if (FirstCommit >= 2019) { | |
| break | |
| } else { | |
| LastCommit = 2018 | |
| } | |
| } | |
| } | |
| } | |
| $0 ~ "'$CommentStart' Copyright.*by Pedro Mendes" { | |
| skip = 2 | |
| } | |
| $0 ~ "('"$CommentStart"'|/\\*) Begin CVS Header" { | |
| skip = 2 | |
| } | |
| { | |
| if (skip == 1) { | |
| if ($0 !~ "^$") { | |
| if (Prolog == 0 && Copyright < 1) { | |
| printCopyright('$FirstCommit', '$LastCommit') | |
| Copyright = 1 | |
| } | |
| print $0 | |
| } | |
| skip = 0 | |
| } else if (skip == 0) { | |
| if (Prolog == 0 && Copyright < 1) { | |
| printCopyright('$FirstCommit', '$LastCommit') | |
| Copyright = 1 | |
| } | |
| print $0 | |
| } | |
| } | |
| $0 ~ "'$CommentStart' All rights reserved." { | |
| if (skip == 2) { | |
| skip = 1 | |
| } | |
| } | |
| $0 ~ "End CVS Header" { | |
| if (skip == 2) { | |
| skip = 1 | |
| } | |
| } | |
| $0 ~ Prolog { | |
| Prolog = 0 | |
| }' | |
| } | |
| cat | clean | |