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

50 lines
1.5 KiB
Bash
Raw Normal View History

2023-05-26 14:19:20 -07:00
#!/bin/bash
current_date=$(date +'%B %Y')
2023-06-01 08:20:10 -07:00
current_year=$(date +'%Y')
2023-05-26 14:19:20 -07:00
# 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">
2023-06-01 08:20:10 -07:00
<name>${name}</name>
2023-05-26 14:19:20 -07:00
<creationDate>${current_date}</creationDate>
<author>${JOOMLA_USER}</author>
<authorEmail>${EMAIL}</authorEmail>
<authorUrl>https://www.example.com/</authorUrl>
2023-06-01 08:20:10 -07:00
<copyright>Copyright (C) ${current_year} ${JOOMLA_USER}, All rights reserved.</copyright>
2023-05-26 14:19:20 -07:00
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
2023-05-26 14:19:20 -07:00
<version>0.0.1</version>
<!-- The description is optional and defaults to the name -->
<description>COM_${name^^}_DESCRIPTION</description>
2023-05-26 14:19:20 -07:00
2023-06-06 01:58:54 -07:00
<namespace path="src/">Harvst\Component\\${name^}</namespace>
2023-05-26 14:19:20 -07:00
<administration>
<!-- The link that will appear in the Admin panel's "Components" menu -->
2023-06-06 01:58:54 -07:00
<menu link="index.php?option=com_${name}">${name^}</menu>
2023-05-26 14:19:20 -07:00
<files folder="admin">
<folder>language</folder>
2023-06-01 08:20:10 -07:00
<folder>services</folder>
<folder>src</folder>
<folder>tmpl</folder>
2023-05-26 14:19:20 -07:00
</files>
2023-06-01 08:20:10 -07:00
<languages folder="admin">
<!-- TODO: It's there but not working -->
<language tag="en-GB">language/en-GB/en-GB.com_${name}.ini</language>
</languages>
2023-05-26 14:19:20 -07:00
</administration>
</extension>
EOM