trim_copyright_notice_sh.sh 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/usr/bin/env bash
  2. # Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Roland Olbricht et al.
  3. #
  4. # This file is part of Overpass_API.
  5. #
  6. # Overpass_API is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU Affero General Public License as
  8. # published by the Free Software Foundation, either version 3 of the
  9. # License, or (at your option) any later version.
  10. #
  11. # Overpass_API is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU Affero General Public License
  17. # along with Overpass_API. If not, see <https://www.gnu.org/licenses/>.
  18. mv "$1" _
  19. echo '#!/usr/bin/env bash' >>"$1"
  20. echo '' >>"$1"
  21. echo '# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Roland Olbricht et al.' >>"$1"
  22. echo '#' >>"$1"
  23. echo '# This file is part of Overpass_API.' >>"$1"
  24. echo '#' >>"$1"
  25. echo '# Overpass_API is free software: you can redistribute it and/or modify' >>"$1"
  26. echo '# it under the terms of the GNU Affero General Public License as' >>"$1"
  27. echo '# published by the Free Software Foundation, either version 3 of the' >>"$1"
  28. echo '# License, or (at your option) any later version.' >>"$1"
  29. echo '#' >>"$1"
  30. echo '# Overpass_API is distributed in the hope that it will be useful,' >>"$1"
  31. echo '# but WITHOUT ANY WARRANTY; without even the implied warranty of' >>"$1"
  32. echo '# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the' >>"$1"
  33. echo '# GNU General Public License for more details.' >>"$1"
  34. echo '#' >>"$1"
  35. echo '# You should have received a copy of the GNU Affero General Public License' >>"$1"
  36. echo '# along with Overpass_API. If not, see <https://www.gnu.org/licenses/>.' >>"$1"
  37. echo '' >>$1
  38. cat <_ | awk -f trim_copyright_notice_sh.awk >>"$1"