Download data/gitTools/header from introvoyz045/COPASI: direct link, hf CLI and curl.
- Browser
- Download file 2.19 kB
-
https://huggingface.co/datasets/introvoyz045/COPASI/resolve/main/data/gitTools/header
- Command line
-
hf download hf://datasets/introvoyz045/COPASI/data/gitTools/header
-
curl -L -o header https://huggingface.co/datasets/introvoyz045/COPASI/resolve/main/data/gitTools/header
2.19 kB
| . "$(git rev-parse --show-toplevel)/gitTools/functions" | |
| case "$1" in | |
| --smudge) | |
| action=smudge | |
| shift | |
| ;; | |
| *) | |
| action=clean | |
| shift | |
| ;; | |
| esac | |
| CommentStart=`getAttribute CommentStart "$1"` | |
| if [ _"$CommentStart" == _unspecified -o \ | |
| _"$CommentStart" == _unset -o \ | |
| _"$CommentStart" == _set -o \ | |
| _"$CommentStart" == _ ]; then | |
| CommentStart= | |
| fi | |
| CommentEnd=`getAttribute CommentEnd "$1"` | |
| if [ _"$CommentEnd" == _unspecified -o \ | |
| _"$CommentEnd" == _unset -o \ | |
| _"$CommentEnd" == _set -o \ | |
| _"$CommentEnd" == _ ]; then | |
| CommentEnd= | |
| fi | |
| PrologEnd=`getAttribute PrologEnd "$1"` | |
| if [ _"$PrologEnd" == _unspecified -o \ | |
| _"$PrologEnd" == _unset -o \ | |
| _"$PrologEnd" == _set -o \ | |
| _"$PrologEnd" == _ ]; then | |
| PrologEnd=0 | |
| fi | |
| Commit="`git log -1 ${branch} --pretty=%H -- "$1"`" | |
| Author="`git log -1 ${branch} --pretty="%an %ae" -- "$1"`" | |
| Date="`git log -1 ${branch} --pretty=%ai -- "$1"`" | |
| GAWK=`gitTool gawk` | |
| [ x"$GAWK" == x ] && CommentStart= | |
| function smudge() { | |
| $GAWK -- ' | |
| BEGIN { | |
| Header = 0 | |
| Skip = 0 | |
| Prolog = "'"$PrologEnd"'" | |
| } | |
| $0 ~ "('"$CommentStart"'|/\\*) Begin git Header" { | |
| skip = 2 | |
| } | |
| { | |
| if (Prolog == 0 && Header < 1) { | |
| printf "'"$CommentStart"' Begin git Header '"$CommentEnd"'\n" | |
| printf "'"$CommentStart"' Commit: '"$Commit"' '"$CommentEnd"'\n" | |
| printf "'"$CommentStart"' Author: '"$Author"' '"$CommentEnd"'\n" | |
| printf "'"$CommentStart"' Date: '"$Date"' '"$CommentEnd"'\n" | |
| printf "'"$CommentStart"' End git Header '"$CommentEnd"'\n" | |
| printf "\n" | |
| Header = 1 | |
| } | |
| if (skip == 0) { | |
| print $0 | |
| } else if (skip == 1) { | |
| if ($0 !~ "^$") { | |
| print $0 | |
| } | |
| skip = 0 | |
| } | |
| } | |
| $0 ~ "End git Header" { | |
| if (skip == 2) { | |
| skip = 1 | |
| } | |
| } | |
| $0 ~ Prolog { | |
| Prolog = 0 | |
| }' | |
| } | |
| function clean () { | |
| $GAWK -- ' | |
| BEGIN { | |
| Skip = 0 | |
| } | |
| $0 ~ "('"$CommentStart"'|/\\*) Begin git Header" { | |
| skip = 2 | |
| } | |
| { | |
| if (skip == 0) { | |
| print $0 | |
| } else if (skip == 1) { | |
| if ($0 !~ "^$") { | |
| print $0 | |
| } | |
| skip = 0 | |
| } | |
| } | |
| $0 ~ "End git Header" { | |
| if (skip == 2) { | |
| skip = 1 | |
| } | |
| }' | |
| } | |
| if [ x"$CommentStart" != x ]; then | |
| cat | $action | |
| else | |
| cat | |
| fi | |