Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- while [[ $# -gt 0 ]]; do
- if sed '/#include/q' "$1" | grep -qi copyright; then
- LINE=$(sed '/#include/q' "$1" | grep -in copyright | cut -d : -f 1 | tail -n1)
- else
- LINE=$(sed '/#include/q' "$1" | grep -in 'GPL\|GNU' | cut -d : -f 1 | tail -n1)
- LINE=$(($LINE - 1))
- sed -i -e "${LINE}a\
- \ *
- " "$1"
- fi
- sed -i -e "${LINE}a\
- \ * Copyright (C) 2018 Razer Inc.
- " "$1"
- shift
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement