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
|
|
|
#
|
2021-05-14 16:52:38 +00:00
|
|
|
# EmulationStation Desktop Edition
|
|
|
|
# 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
|
|
|
|
|
2020-12-30 13:13:53 +00:00
|
|
|
ESBINARY=../emulationstation
|
|
|
|
|
2020-07-16 12:24:48 +00:00
|
|
|
TEMPFILE_INPUT=tempfile_input_$(date +%H%M%S)
|
|
|
|
TEMPFILE_OUTPUT=tempfile_output_$(date +%H%M%S)
|
|
|
|
TARGET_FILENAME=emulationstation.6
|
|
|
|
|
|
|
|
MAN_INCLUDE="
|
|
|
|
[NAME]
|
|
|
|
emulationstation - EmulationStation Desktop Edition
|
|
|
|
|
|
|
|
[DESCRIPTION]
|
2021-08-12 10:03:11 +00:00
|
|
|
EmulationStation Desktop Edition (ES-DE) is a frontend for browsing and launching games from your multi-platform game collection.
|
2020-07-16 12:24:48 +00:00
|
|
|
|
|
|
|
[AUTHOR]
|
2021-03-14 20:35:19 +00:00
|
|
|
Leon Styhre (Desktop Edition fork) <https://es-de.org/>
|
2020-07-16 12:24:48 +00:00
|
|
|
|
2021-03-14 13:38:32 +00:00
|
|
|
RetroPie community (RetroPie fork)
|
2020-07-16 12:24:48 +00:00
|
|
|
|
2021-07-15 20:30:23 +00:00
|
|
|
Alec Lofquist (original version)
|
2020-07-16 12:24:48 +00:00
|
|
|
|
|
|
|
[SEE ALSO]
|
2022-05-15 07:58:03 +00:00
|
|
|
Full documentation is 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.
|
2021-11-14 11:25:59 +00:00
|
|
|
cat $TEMPFILE_OUTPUT | sed s/"EmulationStation Desktop Edition, Emulator 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
|
|
|
|
2021-03-14 20:35:19 +00:00
|
|
|
echo "The man page was generated and saved to ../es-app/assets/emulationstation.6.gz"
|
|
|
|
|
2020-07-16 12:24:48 +00:00
|
|
|
rm $TEMPFILE_INPUT
|
|
|
|
rm $TEMPFILE_OUTPUT
|