2020-07-16 12:24:48 +00:00
|
|
|
#!/usr/bin/bash
|
2021-05-14 16:52:38 +00:00
|
|
|
# SPDX-License-Identifier: MIT
|
2020-07-16 12:24:48 +00:00
|
|
|
#
|
2023-12-16 11:30:13 +00:00
|
|
|
# ES-DE
|
2021-05-14 16:52:38 +00:00
|
|
|
# generate_man_page.sh
|
2020-07-16 12:24:48 +00:00
|
|
|
#
|
2021-05-14 16:52:38 +00:00
|
|
|
# Generates the Unix manual page.
|
|
|
|
# The script takes no arguments and replaces the man page file es-app/assets/emulationstation.6.gz
|
|
|
|
# It has to be run from within the tools directory.
|
2020-07-16 12:24:48 +00:00
|
|
|
#
|
2021-05-14 16:52:38 +00:00
|
|
|
# The command help2man must be installed, or the script will fail.
|
2020-07-16 12:24:48 +00:00
|
|
|
#
|
2021-05-14 16:52:38 +00:00
|
|
|
# This script is only intended to be used on Linux systems.
|
2020-07-16 12:24:48 +00:00
|
|
|
#
|
|
|
|
|
2020-12-30 13:13:53 +00:00
|
|
|
if [ ! -f ../es-app/CMakeLists.txt ]; then
|
|
|
|
echo "You need to run this script from within the tools directory."
|
|
|
|
exit
|
2020-07-16 12:24:48 +00:00
|
|
|
fi
|
|
|
|
|
2023-12-16 11:30:13 +00:00
|
|
|
ESBINARY=../es-de
|
2020-12-30 13:13:53 +00:00
|
|
|
|
2020-07-16 12:24:48 +00:00
|
|
|
TEMPFILE_INPUT=tempfile_input_$(date +%H%M%S)
|
|
|
|
TEMPFILE_OUTPUT=tempfile_output_$(date +%H%M%S)
|
2023-12-16 11:30:13 +00:00
|
|
|
TARGET_FILENAME=es-de.6
|
2020-07-16 12:24:48 +00:00
|
|
|
|
|
|
|
MAN_INCLUDE="
|
|
|
|
[NAME]
|
2024-03-24 11:42:20 +00:00
|
|
|
es-de - ES-DE Frontend
|
2020-07-16 12:24:48 +00:00
|
|
|
|
|
|
|
[DESCRIPTION]
|
2024-03-24 11:42:20 +00:00
|
|
|
ES-DE is a frontend for browsing and launching games from your multi-platform collection.
|
2020-07-16 12:24:48 +00:00
|
|
|
|
|
|
|
[AUTHOR]
|
2023-12-16 11:30:13 +00:00
|
|
|
Leon Styhre <https://es-de.org/>
|
2020-07-16 12:24:48 +00:00
|
|
|
|
2024-03-24 11:42:20 +00:00
|
|
|
RetroPie community (RetroPie EmulationStation)
|
2020-07-16 12:24:48 +00:00
|
|
|
|
2023-12-16 11:30:13 +00:00
|
|
|
Alec Lofquist (original EmulationStation)
|
2020-07-16 12:24:48 +00:00
|
|
|
|
|
|
|
[SEE ALSO]
|
2022-06-17 19:15:52 +00:00
|
|
|
Full documentation available at: <https://gitlab.com/es-de/emulationstation-de/>
|
2020-07-16 12:24:48 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
echo "${MAN_INCLUDE}" > $TEMPFILE_INPUT
|
|
|
|
|
|
|
|
help2man --section 6 --no-info --include $TEMPFILE_INPUT $ESBINARY > $TEMPFILE_OUTPUT
|
|
|
|
|
|
|
|
# Manual string replacements, these may need to be modified if changes are made to the
|
|
|
|
# command line --help output.
|
2024-03-24 11:42:20 +00:00
|
|
|
cat $TEMPFILE_OUTPUT | sed s/"ES\\\-DE Frontend"/""/g | \
|
2020-07-16 12:24:48 +00:00
|
|
|
sed s/"Set to at least"/".br\nSet to at least"/ > $TARGET_FILENAME
|
|
|
|
|
2021-04-02 07:46:31 +00:00
|
|
|
gzip -9 $TARGET_FILENAME
|
2020-12-30 13:13:53 +00:00
|
|
|
mv ${TARGET_FILENAME}.gz ../es-app/assets/
|
2020-07-16 12:24:48 +00:00
|
|
|
|
2023-12-16 11:30:13 +00:00
|
|
|
echo "The man page was generated and saved to ../es-app/assets/es-de.6.gz"
|
2021-03-14 20:35:19 +00:00
|
|
|
|
2020-07-16 12:24:48 +00:00
|
|
|
rm $TEMPFILE_INPUT
|
|
|
|
rm $TEMPFILE_OUTPUT
|