1#!/bin/bash 2 3if [ "$1" == "--help" ]; then 4 echo "Add header if the zcbor files are updated." 5 exit -1 6fi 7 8add_copy_notice() { 9echo "$(printf '/* 10 * This file has been %s from the zcbor library. 11 * Commit %s 12 */ 13 14' "$2" "$(zcbor --version)"; cat $1;)" > $1 15} 16 17add_copy_notice src/zcbor_decode.c "copied" 18add_copy_notice src/zcbor_encode.c "copied" 19add_copy_notice src/zcbor_common.c "copied" 20add_copy_notice include/zcbor_decode.h "copied" 21add_copy_notice include/zcbor_encode.h "copied" 22add_copy_notice include/zcbor_common.h "copied" 23