GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — cpplint/regen-defs.zsh at develop · PNHD/cpplint Expand file tree/ Copy pathregen-defs.zshMore file actions executable file ·48 lines (39 loc) · 1.12 KB / Copy pathregen-defs.zshFile metadata and controlsexecutable file ·48 lines (39 loc) · 1.12 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 #!/bin/zsh # Input the path of cpplint here cpplint="$HOME/Documents/cpplint/cpplint.py" cd samples/ || exit 74 # EX_IOERROR # Loop through all .def files in the given directories folders=(${(f)"$(cat)"}) for folder in $folders; do cd "$folder-sample/" || exit 66 # EX_NOINPUT for file in ./*.def; do if [[ ! -s "$file" ]]; then echo "Skipping empty file: $file" continue fi echo "Processing $file..." # Extract the command from the first line of the file cmd=$(head -n 1 "$file") # Create temporary files for stdout and stderr stdout_file=$(mktemp) stderr_file=$(mktemp) # Execute the command and capture stdout and stderr uv run "$cpplint" $cmd > "$stdout_file" 2> "$stderr_file" ret_code=$? # Count the number of lines in stdout (( num_lines=$(wc -l < "$stdout_file") + 1 )) # Overwrite the original definition file { echo "$cmd" echo "$ret_code" echo "$num_lines" cat "$stdout_file" echo cat "$stderr_file" echo } > "$file" # Clean up temporary files rm "$stdout_file" "$stderr_file" done cd .. done |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |