• Thomas Haller's avatar
    all: unify format of our Copyright source code comments · 3b69f021
    Thomas Haller authored
    ```bash
    
    readarray -d '' FILES < <(
      git ls-files -z \
        ':(exclude)po' \
        ':(exclude)shared/c-rbtree' \
        ':(exclude)shared/c-list' \
        ':(exclude)shared/c-siphash' \
        ':(exclude)shared/c-stdaux' \
        ':(exclude)shared/n-acd' \
        ':(exclude)shared/n-dhcp4' \
        ':(exclude)src/systemd/src' \
        ':(exclude)shared/systemd/src' \
        ':(exclude)m4' \
        ':(exclude)COPYING*'
      )
    
    sed \
      -e 's/^\(--\|#\| \*\) *\(([cC]) *\)\?Copyright \+\(\(([cC])\) \+\)\?\(\(20\|19\)[0-9][0-9]\) *[-–] *\(\(20\|19\)[0-9][0-9]\) \+\([^ ].*\)$/\1 C1pyright#\5 - \7#\9/' \
      -e 's/^\(--\|#\| \*\) *\(([cC]) *\)\?Copyright \+\(\(([cC])\) \+\)\?\(\(20\|19\)[0-9][0-9]\) *[,] *\(\(20\|19\)[0-9][0-9]\) \+\([^ ].*\)$/\1 C2pyright#\5, \7#\9/' \
      -e 's/^\(--\|#\| \*\) *\(([cC]) *\)\?Copyright \+\(\(([cC])\) \+\)\?\(\(20\|19\)[0-9][0-9]\) \+\([^ ].*\)$/\1 C3pyright#\5#\7/' \
      -e 's/^Copyright \(\(20\|19\)[0-9][0-9]\) \+\([^ ].*\)$/C4pyright#\1#\3/' \
      -i \
      "${FILES[@]}"
    
    echo ">>> untouched Copyright lines"
    git grep Copyright "${FILES[@]}"
    
    echo ">>> Copyright lines with unusual extra"
    git grep '\<C[0-9]pyright#' "${FILES[@]}" | grep -i reserved
    
    sed \
      -e 's/\<C[0-9]pyright#\([^#]*\)#\(.*\)$/Copyright (C) \1 \2/' \
      -i \
      "${FILES[@]}"
    
    ```
    
    !298
    3b69f021
Name
Last commit
Last update
..
newt Loading commit data...
meson.build Loading commit data...
nm-editor-bindings.c Loading commit data...
nm-editor-bindings.h Loading commit data...
nm-editor-utils.c Loading commit data...
nm-editor-utils.h Loading commit data...
nmt-address-list.c Loading commit data...
nmt-address-list.h Loading commit data...
nmt-connect-connection-list.c Loading commit data...
nmt-connect-connection-list.h Loading commit data...
nmt-device-entry.c Loading commit data...
nmt-device-entry.h Loading commit data...
nmt-edit-connection-list.c Loading commit data...
nmt-edit-connection-list.h Loading commit data...
nmt-editor-grid.c Loading commit data...
nmt-editor-grid.h Loading commit data...
nmt-editor-page-device.c Loading commit data...
nmt-editor-page-device.h Loading commit data...
nmt-editor-page.c Loading commit data...
nmt-editor-page.h Loading commit data...
nmt-editor-section.c Loading commit data...
nmt-editor-section.h Loading commit data...
nmt-editor.c Loading commit data...
nmt-editor.h Loading commit data...
nmt-ip-entry.c Loading commit data...
nmt-ip-entry.h Loading commit data...
nmt-mac-entry.c Loading commit data...
nmt-mac-entry.h Loading commit data...
nmt-mtu-entry.c Loading commit data...
nmt-mtu-entry.h Loading commit data...
nmt-page-bond.c Loading commit data...
nmt-page-bond.h Loading commit data...
nmt-page-bridge-port.c Loading commit data...
nmt-page-bridge-port.h Loading commit data...
nmt-page-bridge.c Loading commit data...
nmt-page-bridge.h Loading commit data...
nmt-page-dsl.c Loading commit data...
nmt-page-dsl.h Loading commit data...
nmt-page-ethernet.c Loading commit data...
nmt-page-ethernet.h Loading commit data...
nmt-page-infiniband.c Loading commit data...
nmt-page-infiniband.h Loading commit data...
nmt-page-ip-tunnel.c Loading commit data...
nmt-page-ip-tunnel.h Loading commit data...
nmt-page-ip4.c Loading commit data...
nmt-page-ip4.h Loading commit data...
nmt-page-ip6.c Loading commit data...
nmt-page-ip6.h Loading commit data...
nmt-page-ppp.c Loading commit data...
nmt-page-ppp.h Loading commit data...
nmt-page-team-port.c Loading commit data...
nmt-page-team-port.h Loading commit data...
nmt-page-team.c Loading commit data...
nmt-page-team.h Loading commit data...
nmt-page-vlan.c Loading commit data...
nmt-page-vlan.h Loading commit data...
nmt-page-wifi.c Loading commit data...
nmt-page-wifi.h Loading commit data...
nmt-password-dialog.c Loading commit data...
nmt-password-dialog.h Loading commit data...
nmt-password-fields.c Loading commit data...
nmt-password-fields.h Loading commit data...
nmt-route-editor.c Loading commit data...
nmt-route-editor.h Loading commit data...
nmt-route-entry.c Loading commit data...
nmt-route-entry.h Loading commit data...
nmt-route-table.c Loading commit data...
nmt-route-table.h Loading commit data...
nmt-slave-list.c Loading commit data...
nmt-slave-list.h Loading commit data...
nmt-utils.c Loading commit data...
nmt-utils.h Loading commit data...
nmt-widget-list.c Loading commit data...
nmt-widget-list.h Loading commit data...
nmtui-connect.c Loading commit data...
nmtui-connect.h Loading commit data...
nmtui-edit.c Loading commit data...
nmtui-edit.h Loading commit data...
nmtui-hostname.c Loading commit data...
nmtui-hostname.h Loading commit data...
nmtui.c Loading commit data...
nmtui.h Loading commit data...