mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	* Use vendored go-swagger (#8087) * Use vendored go-swagger * vendor go-swagger * revert un wanteed change * remove un-needed GO111MODULE * Update Makefile Co-Authored-By: techknowlogick <matti@mdranta.net> * re-generate swagger file
This commit is contained in:
		
				
					committed by
					
						
						Lauris BH
					
				
			
			
				
	
			
			
			
						parent
						
							2f71571305
						
					
				
				
					commit
					c4d8d53a6d
				
			
							
								
								
									
										42
									
								
								vendor/github.com/prometheus/procfs/ttar
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										42
									
								
								vendor/github.com/prometheus/procfs/ttar
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -86,8 +86,10 @@ Usage:   $bname [-C <DIR>] -c -f <ARCHIVE> <FILE...> (create archive)
 | 
			
		||||
         $bname [-C <DIR>] -x -f <ARCHIVE>           (extract archive)
 | 
			
		||||
 | 
			
		||||
Options:
 | 
			
		||||
         -C <DIR>                                    (change directory)
 | 
			
		||||
         -v                                          (verbose)
 | 
			
		||||
         -C <DIR>           (change directory)
 | 
			
		||||
         -v                 (verbose)
 | 
			
		||||
         --recursive-unlink (recursively delete existing directory if path
 | 
			
		||||
                             collides with file or directory to extract)
 | 
			
		||||
 | 
			
		||||
Example: Change to sysfs directory, create ttar file from fixtures directory
 | 
			
		||||
         $bname -C sysfs -c -f sysfs/fixtures.ttar fixtures/
 | 
			
		||||
@@ -111,8 +113,9 @@ function set_cmd {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
unset VERBOSE
 | 
			
		||||
unset RECURSIVE_UNLINK
 | 
			
		||||
 | 
			
		||||
while getopts :cf:htxvC: opt; do
 | 
			
		||||
while getopts :cf:-:htxvC: opt; do
 | 
			
		||||
    case $opt in
 | 
			
		||||
        c)
 | 
			
		||||
            set_cmd "create"
 | 
			
		||||
@@ -136,6 +139,18 @@ while getopts :cf:htxvC: opt; do
 | 
			
		||||
        C)
 | 
			
		||||
            CDIR=$OPTARG
 | 
			
		||||
            ;;
 | 
			
		||||
        -)
 | 
			
		||||
            case $OPTARG in
 | 
			
		||||
                recursive-unlink)
 | 
			
		||||
                    RECURSIVE_UNLINK="yes"
 | 
			
		||||
                    ;;
 | 
			
		||||
                *)
 | 
			
		||||
                    echo -e "Error: invalid option -$OPTARG"
 | 
			
		||||
                    echo
 | 
			
		||||
                    usage 1
 | 
			
		||||
                    ;;
 | 
			
		||||
            esac
 | 
			
		||||
            ;;
 | 
			
		||||
        *)
 | 
			
		||||
            echo >&2 "ERROR: invalid option -$OPTARG"
 | 
			
		||||
            echo
 | 
			
		||||
@@ -212,16 +227,16 @@ function extract {
 | 
			
		||||
        local eof_without_newline
 | 
			
		||||
        if [ "$size" -gt 0 ]; then
 | 
			
		||||
            if [[ "$line" =~ [^\\]EOF ]]; then
 | 
			
		||||
                # An EOF not preceeded by a backslash indicates that the line
 | 
			
		||||
                # An EOF not preceded by a backslash indicates that the line
 | 
			
		||||
                # does not end with a newline
 | 
			
		||||
                eof_without_newline=1
 | 
			
		||||
            else
 | 
			
		||||
                eof_without_newline=0
 | 
			
		||||
            fi
 | 
			
		||||
            # Replace NULLBYTE with null byte if at beginning of line
 | 
			
		||||
            # Replace NULLBYTE with null byte unless preceeded by backslash
 | 
			
		||||
            # Replace NULLBYTE with null byte unless preceded by backslash
 | 
			
		||||
            # Remove one backslash in front of NULLBYTE (if any)
 | 
			
		||||
            # Remove EOF unless preceeded by backslash
 | 
			
		||||
            # Remove EOF unless preceded by backslash
 | 
			
		||||
            # Remove one backslash in front of EOF
 | 
			
		||||
            if [ $USE_PYTHON -eq 1 ]; then
 | 
			
		||||
                echo -n "$line" | python -c "$PYTHON_EXTRACT_FILTER" >> "$path"
 | 
			
		||||
@@ -245,7 +260,16 @@ function extract {
 | 
			
		||||
        fi
 | 
			
		||||
        if [[ $line =~ ^Path:\ (.*)$ ]]; then
 | 
			
		||||
            path=${BASH_REMATCH[1]}
 | 
			
		||||
            if [ -e "$path" ] || [ -L "$path" ]; then
 | 
			
		||||
            if [ -L "$path" ]; then
 | 
			
		||||
                rm "$path"
 | 
			
		||||
            elif [ -d "$path" ]; then
 | 
			
		||||
                if [ "${RECURSIVE_UNLINK:-}" == "yes" ]; then
 | 
			
		||||
                    rm -r "$path"
 | 
			
		||||
                else
 | 
			
		||||
                    # Safe because symlinks to directories are dealt with above
 | 
			
		||||
                    rmdir "$path"
 | 
			
		||||
                fi
 | 
			
		||||
            elif [ -e "$path" ]; then
 | 
			
		||||
                rm "$path"
 | 
			
		||||
            fi
 | 
			
		||||
        elif [[ $line =~ ^Lines:\ (.*)$ ]]; then
 | 
			
		||||
@@ -338,8 +362,8 @@ function _create {
 | 
			
		||||
            else
 | 
			
		||||
                < "$file" \
 | 
			
		||||
                    sed 's/EOF/\\EOF/g;
 | 
			
		||||
                         s/NULLBYTE/\\NULLBYTE/g;
 | 
			
		||||
                         s/\x0/NULLBYTE/g;
 | 
			
		||||
                            s/NULLBYTE/\\NULLBYTE/g;
 | 
			
		||||
                            s/\x0/NULLBYTE/g;
 | 
			
		||||
                    '
 | 
			
		||||
            fi
 | 
			
		||||
            if [[ "$eof_without_newline" -eq 1 ]]; then
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user