Create a command for generating copyright notice for GPL licenses
This commit is contained in:
parent
e111ecb1c2
commit
e3d242df89
|
@ -0,0 +1,23 @@
|
|||
name="Ngô Ngọc Đức Huy"
|
||||
year=`date "+%Y"`
|
||||
printf "Please input a license name: "
|
||||
read license
|
||||
printf "Please input the language: "
|
||||
read language
|
||||
printf "Please input the project name: "
|
||||
read project
|
||||
if [ $license = "agpl" ]
|
||||
then
|
||||
license="Affero General Public License"
|
||||
elif [ $license = "gpl" ]
|
||||
then
|
||||
license="General Public License"
|
||||
elif [ $license = "lgpl" ]
|
||||
then
|
||||
license="Lesser General Public License"
|
||||
else
|
||||
echo "Invalid license name."
|
||||
fi
|
||||
cat ~/utils/notices/notice.$language | sed "s/FULL_LICENSE_NAME/$license/" \
|
||||
| sed s/YEAR/$year/ | sed "s/AUTHOR/$name/" \
|
||||
| sed "s/PROJECT_NAME/$project/"
|
|
@ -0,0 +1,18 @@
|
|||
/* DESCRIPTION
|
||||
* Copyright (C) YEAR AUTHOR
|
||||
*
|
||||
* This file is part of PROJECT_NAME.
|
||||
*
|
||||
* PROJECT_NAME is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU FULL_LICENSE_NAME as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PROJECT_NAME is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU FULL_LICENSE_NAME for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU FULL_LICENSE_NAME
|
||||
* along with PROJECT_NAME. If not, see <https://www.gnu.org/licenses/>.
|
||||
* */
|
|
@ -0,0 +1,17 @@
|
|||
# DESCRIPTION
|
||||
# Copyright (C) YEAR AUTHOR
|
||||
#
|
||||
# This file is part of PROJECT_NAME.
|
||||
#
|
||||
# PROJECT_NAME is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU FULL_LICENSE_NAME as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# PROJECT_NAME is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU FULL_LICENSE_NAME for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU FULL_LICENSE_NAME
|
||||
# along with PROJECT_NAME. If not, see <https://www.gnu.org/licenses/>.
|
|
@ -0,0 +1,19 @@
|
|||
<!--
|
||||
~ DESCRIPTION
|
||||
~ Copyright (C) YEAR AUTHOR
|
||||
~
|
||||
~ This file is part of PROJECT_NAME.
|
||||
~
|
||||
~ PROJECT_NAME is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU FULL_LICENSE_NAME as published by
|
||||
~ the Free Software Foundation, either version 3 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ PROJECT_NAME is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU FULL_LICENSE_NAME for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU FULL_LICENSE_NAME
|
||||
~ along with PROJECT_NAME. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
Loading…
Reference in New Issue