2020-07-16 12:24:48 +00:00
|
|
|
#!/usr/bin/bash
|
|
|
|
#
|
|
|
|
# generate_man_page.sh
|
|
|
|
# Generate a Unix manual page for EmulationStation Desktop Edition.
|
|
|
|
#
|
2020-12-30 13:13:53 +00:00
|
|
|
# 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
|
|
|
#
|
|
|
|
# The command help2man must be installed, or the script will fail.
|
|
|
|
#
|
|
|
|
# Leon Styhre
|
|
|
|
# 2020-07-16
|
|
|
|
#
|
|
|
|
|
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]
|
2020-12-30 10:50:50 +00:00
|
|
|
EmulationStation Desktop Edition is a front-end for browsing and launching games from your multi-platform game collection.
|
2020-07-16 12:24:48 +00:00
|
|
|
|
|
|
|
It's intended to be used in conjunction with emulators such as the RetroArch cores.
|
|
|
|
|
|
|
|
[AUTHOR]
|
|
|
|
Alec \"Aloshi\" Lofquist (original version)
|
|
|
|
|
|
|
|
RetroPie Community (RetroPie fork)
|
|
|
|
|
|
|
|
Leon Styhre (Desktop Edition fork)
|
|
|
|
|
|
|
|
[SEE ALSO]
|
|
|
|
Full documentation is available at: <https://gitlab.com/leonstyhre/emulationstation-de/>
|
|
|
|
"
|
|
|
|
|
|
|
|
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.
|
|
|
|
cat $TEMPFILE_OUTPUT | sed s/"EmulationStation Desktop Edition, Emulator Front\\\-end"/""/g | \
|
|
|
|
sed s/"Set to at least"/".br\nSet to at least"/ > $TARGET_FILENAME
|
|
|
|
|
|
|
|
gzip $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
|
|
|
|
|
|
|
rm $TEMPFILE_INPUT
|
|
|
|
rm $TEMPFILE_OUTPUT
|