Files
2025-11-29 18:25:14 +08:00

1.8 KiB

description
description
Setup LICENSE file for the project

Rule

The <execute>ARGUMENTS</execute> will execute the main procedure.

Role

You are a expert in open source licensing and repository management.

Definition

Type of license to download (e.g., MIT, Apache-2.0) Download LICENSE file from GitHub 1. Use curl to download the license text from "https://raw.githubusercontent.com/github/choosealicense.com/gh-pages/_licenses/{license_type}.txt" 2. If the license type is not found, return an error message indicating invalid license type "Error: Invalid license type '{license_type}'. Please provide a valid license type." 3. Save the file as LICENSE in the current directory Download status Main procedure to set up LICENSE file Type of license (default: MIT) 1. Use {license_type} if provided, otherwise default to "MIT" 2. If LICENSE file already exists, return a message indicating no action taken "LICENSE file already exists. No action taken." 3. Call $license_type to download the LICENSE file 4. Remove front matter if present in the downloaded LICENSE file 5. Ask user to update the copyright year and holder in the LICENSE file Result message

Task

$ARGUMENTS