This repository has been archived on 2024-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
joomla/bin/component_parts/manifest.sh
2023-06-06 01:58:54 -07:00

50 lines
1.5 KiB
Bash

#!/bin/bash
current_date=$(date +'%B %Y')
current_year=$(date +'%Y')
# Check if JOOMLA_USER is set, otherwise prompt for it
if [ -z "$JOOMLA_USER" ]; then
read -p "Enter the Joomla user: " JOOMLA_USER
fi
# Check if EMAIL is set, otherwise prompt for it
if [ -z "$EMAIL" ]; then
read -p "Enter the email address: " EMAIL
fi
cat <<EOM > ${name}.xml
<?xml version="1.0" encoding="UTF-8"?>
<extension type="component" method="upgrade">
<name>${name}</name>
<creationDate>${current_date}</creationDate>
<author>${JOOMLA_USER}</author>
<authorEmail>${EMAIL}</authorEmail>
<authorUrl>https://www.example.com/</authorUrl>
<copyright>Copyright (C) ${current_year} ${JOOMLA_USER}, All rights reserved.</copyright>
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
<version>0.0.1</version>
<!-- The description is optional and defaults to the name -->
<description>COM_${name^^}_DESCRIPTION</description>
<namespace path="src/">Harvst\Component\\${name^}</namespace>
<administration>
<!-- The link that will appear in the Admin panel's "Components" menu -->
<menu link="index.php?option=com_${name}">${name^}</menu>
<files folder="admin">
<folder>language</folder>
<folder>services</folder>
<folder>src</folder>
<folder>tmpl</folder>
</files>
<languages folder="admin">
<!-- TODO: It's there but not working -->
<language tag="en-GB">language/en-GB/en-GB.com_${name}.ini</language>
</languages>
</administration>
</extension>
EOM