When you add new files to the project, please include the following license notice at the top of each file:
For files with extensions(.java,.py,.cpp,.gradle,.kt,.kts)
/*************************************************************************
* This file is part of CodeOps Studio.
* CodeOps Studio - Code anywhere anytime
* https://github.com/euptron/CodeOps-Studio
* Copyright (C) 2024-2025 EUP
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://www.gnu.org/licenses/
*
* If you have more questions, feel free to message EUP if you have any
* questions or need additional information. Email: etido.up@gmail.com
*************************************************************************/
For files with XML syntax (.xml)
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ This file is part of CodeOps Studio.
~ CodeOps Studio - Code anywhere anytime
~ https://github.com/euptron/CodeOps-Studio
~ Copyright (C) 2024-2025 EUP
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program 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 General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see https://www.gnu.org/licenses/
~
~ If you have more questions, feel free to message EUP if you have any
~ questions or need additional information. Email: etido.up@gmail.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
You can do this automatically by using the add_license_header.sh
script to automate the process of adding customizable license headers to files within your project directory in Termux. It ensures compliance with licensing requirements and maintains consistency across project files.
- Automatically adds license headers to multiple file types.
- Supports both automatic addition to all files in a directory and specific file targeting.
- Customizable license header content tailored for different file types.
-
Navigate to Your Project Directory:
- Open Termux and navigate to the directory containing
add_license_header.sh
:cd /path/to/your/project
- Open Termux and navigate to the directory containing
-
Set Execution Permissions:
- Ensure the script has execute permissions:
chmod +x add_license_header.sh
- Ensure the script has execute permissions:
To add license headers to all files in your project directory:
$ bash add_license_header.sh
To add a license header to a specific file:
$ bash add_license_header.sh --manual path/to/your/file.java
Replace path/to/your/file.java
with the actual path to the file you want to modify.
- Modify License Header: Edit the
LICENSE_HEADER
variable in the script to customize license text for different file types.
- Time-saving Automation: Automates the task of adding license headers, reducing manual effort.
- Compliance Assurance: Ensures adherence to GNU General Public License (GPL) and project-specific licensing terms.
- Flexibility: Handles bulk updates or specific file modifications seamlessly.
- Skill Requirement: Basic knowledge of shell scripting is necessary for customization and troubleshooting.
- Permission Issues: Ensure correct permissions (
chmod +x
) to execute the script in Termux.
- Permission Denied: Grant execute permissions (
chmod +x add_license_header.sh
) if needed. - Customization Issues: Modify the
LICENSE_HEADER
variable within the script as required.
For further assistance or questions regarding add_license_header.sh
, please contact me at etido.up@gmail.com.