change for new pid script
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
parent
8c3bdba798
commit
4b519d9911
|
@ -5,6 +5,6 @@ cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
|
||||||
# Launch the process in background, record the PID into a file, wait
|
# Launch the process in background, record the PID into a file, wait
|
||||||
# for the process to terminate and erase the recorded PID
|
# for the process to terminate and erase the recorded PID
|
||||||
mednafen -fs 1 -gg.stretch full "$1"&
|
mednafen -fs 1 -gg.stretch full "$1"&
|
||||||
record_pid $!
|
pid record $!
|
||||||
wait $!
|
wait $!
|
||||||
erase_pid
|
pid erase
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
# Launch the process in background, record the PID into a file, wait
|
# Launch the process in background, record the PID into a file, wait
|
||||||
# for the process to terminate and erase the recorded PID
|
# for the process to terminate and erase the recorded PID
|
||||||
sdlgnuboy --syncrtc --stereo=0 "$1"&
|
sdlgnuboy --syncrtc --stereo=0 "$1"&
|
||||||
record_pid $!
|
pid record $!
|
||||||
wait $!
|
wait $!
|
||||||
erase_pid
|
pid erase
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# for the process to terminate and erase the recorded PID
|
# for the process to terminate and erase the recorded PID
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
gpsp "$1"&
|
gpsp "$1"&
|
||||||
record_pid $!
|
pid record $!
|
||||||
wait $!
|
wait $!
|
||||||
erase_pid
|
pid erase
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
# Launch the process in background, record the PID into a file, wait
|
# Launch the process in background, record the PID into a file, wait
|
||||||
# for the process to terminate and erase the recorded PID
|
# for the process to terminate and erase the recorded PID
|
||||||
gpsp "$1"&
|
gpsp "$1"&
|
||||||
record_pid $!
|
pid record $!
|
||||||
wait $!
|
wait $!
|
||||||
erase_pid
|
pid erase
|
||||||
|
|
|
@ -5,6 +5,6 @@ cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
|
||||||
# Launch the process in background, record the PID into a file, wait
|
# Launch the process in background, record the PID into a file, wait
|
||||||
# for the process to terminate and erase the recorded PID
|
# for the process to terminate and erase the recorded PID
|
||||||
mednafen -fs 1 -lynx.stretch full "$1"&
|
mednafen -fs 1 -lynx.stretch full "$1"&
|
||||||
record_pid $!
|
pid record $!
|
||||||
wait $!
|
wait $!
|
||||||
erase_pid
|
pid erase
|
||||||
|
|
|
@ -5,6 +5,6 @@ cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
|
||||||
# Launch the process in background, record the PID into a file, wait
|
# Launch the process in background, record the PID into a file, wait
|
||||||
# for the process to terminate and erase the recorded PID
|
# for the process to terminate and erase the recorded PID
|
||||||
mednafen -sound 1 -soundrate 22050 -soundbufsize 100 -vdriver sdl -frameskip 1 -fs 0 "$1"&
|
mednafen -sound 1 -soundrate 22050 -soundbufsize 100 -vdriver sdl -frameskip 1 -fs 0 "$1"&
|
||||||
record_pid $!
|
pid record $!
|
||||||
wait $!
|
wait $!
|
||||||
erase_pid
|
pid erase
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
# Launch the process in background, record the PID into a file, wait
|
# Launch the process in background, record the PID into a file, wait
|
||||||
# for the process to terminate and erase the recorded PID
|
# for the process to terminate and erase the recorded PID
|
||||||
PicoDrive "$1"&
|
PicoDrive "$1"&
|
||||||
record_pid $!
|
pid record $!
|
||||||
wait $!
|
wait $!
|
||||||
erase_pid
|
pid erase
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
# Launch the process in background, record the PID into a file, wait
|
# Launch the process in background, record the PID into a file, wait
|
||||||
# for the process to terminate and erase the recorded PID
|
# for the process to terminate and erase the recorded PID
|
||||||
fceux "$1"&
|
fceux "$1"&
|
||||||
record_pid $!
|
pid record $!
|
||||||
wait $!
|
wait $!
|
||||||
erase_pid
|
pid erase
|
||||||
|
|
|
@ -5,6 +5,6 @@ cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
|
||||||
# Launch the process in background, record the PID into a file, wait
|
# Launch the process in background, record the PID into a file, wait
|
||||||
# for the process to terminate and erase the recorded PID
|
# for the process to terminate and erase the recorded PID
|
||||||
mednafen -fs 1 -ngp.stretch full "$1"&
|
mednafen -fs 1 -ngp.stretch full "$1"&
|
||||||
record_pid $!
|
pid record $!
|
||||||
wait $!
|
wait $!
|
||||||
erase_pid
|
pid erase
|
||||||
|
|
|
@ -5,6 +5,6 @@ cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
|
||||||
# Launch the process in background, record the PID into a file, wait
|
# Launch the process in background, record the PID into a file, wait
|
||||||
# for the process to terminate and erase the recorded PID
|
# for the process to terminate and erase the recorded PID
|
||||||
mednafen -fs 1 -force_module pce_fast -pce_fast.stretch full "$1"&
|
mednafen -fs 1 -force_module pce_fast -pce_fast.stretch full "$1"&
|
||||||
record_pid $!
|
pid record $!
|
||||||
wait $!
|
wait $!
|
||||||
erase_pid
|
pid erase
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
# Launch the process in background, record the PID into a file, wait
|
# Launch the process in background, record the PID into a file, wait
|
||||||
# for the process to terminate and erase the recorded PID
|
# for the process to terminate and erase the recorded PID
|
||||||
pcsx -frameskip -cdfile "$1"&
|
pcsx -frameskip -cdfile "$1"&
|
||||||
record_pid $!
|
pid record $!
|
||||||
wait $!
|
wait $!
|
||||||
erase_pid
|
pid erase
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
# Launch the process in background, record the PID into a file, wait
|
# Launch the process in background, record the PID into a file, wait
|
||||||
# for the process to terminate and erase the recorded PID
|
# for the process to terminate and erase the recorded PID
|
||||||
pcsx -cdfile "$1"&
|
pcsx -cdfile "$1"&
|
||||||
record_pid $!
|
pid record $!
|
||||||
wait $!
|
wait $!
|
||||||
erase_pid
|
pid erase
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
# Launch the process in background, record the PID into a file, wait
|
# Launch the process in background, record the PID into a file, wait
|
||||||
# for the process to terminate and erase the recorded PID
|
# for the process to terminate and erase the recorded PID
|
||||||
PicoDrive "$1"&
|
PicoDrive "$1"&
|
||||||
record_pid $!
|
pid record $!
|
||||||
wait $!
|
wait $!
|
||||||
erase_pid
|
pid erase
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
# Launch the process in background, record the PID into a file, wait
|
# Launch the process in background, record the PID into a file, wait
|
||||||
# for the process to terminate and erase the recorded PID
|
# for the process to terminate and erase the recorded PID
|
||||||
psnes "$1"&
|
psnes "$1"&
|
||||||
record_pid $!
|
pid record $!
|
||||||
wait $!
|
wait $!
|
||||||
erase_pid
|
pid erase
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
# Launch the process in background, record the PID into a file, wait
|
# Launch the process in background, record the PID into a file, wait
|
||||||
# for the process to terminate and erase the recorded PID
|
# for the process to terminate and erase the recorded PID
|
||||||
psnes "$1"&
|
psnes "$1"&
|
||||||
record_pid $!
|
pid record $!
|
||||||
wait $!
|
wait $!
|
||||||
erase_pid
|
pid erase
|
||||||
|
|
|
@ -5,6 +5,6 @@ cp /usr/games/mednafen-09x.cfg ${MEDNAFEN_HOME}/
|
||||||
# Launch the process in background, record the PID into a file, wait
|
# Launch the process in background, record the PID into a file, wait
|
||||||
# for the process to terminate and erase the recorded PID
|
# for the process to terminate and erase the recorded PID
|
||||||
mednafen -fs 1 -wswan.stretch full "$1"&
|
mednafen -fs 1 -wswan.stretch full "$1"&
|
||||||
record_pid $!
|
pid record $!
|
||||||
wait $!
|
wait $!
|
||||||
erase_pid
|
pid erase
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Uncomment the following line to get debug info
|
|
||||||
#set -x
|
|
||||||
|
|
||||||
# Check args
|
|
||||||
if [ ${#} -ne 0 ]; then
|
|
||||||
echo "Usage: $(basename ${0})"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
rm -f /var/run/funkey.pid
|
|
||||||
exit 0
|
|
|
@ -94,9 +94,9 @@ init_frontend() {
|
||||||
|
|
||||||
# Record the PID into a file, wait for the process to
|
# Record the PID into a file, wait for the process to
|
||||||
# terminate and erase the recorded PID
|
# terminate and erase the recorded PID
|
||||||
record_pid $!
|
pid record $!
|
||||||
wait $!
|
wait $!
|
||||||
erase_pid
|
pid erase
|
||||||
|
|
||||||
# In case retrofe/opkrun quits with errors, clear graphic VT
|
# In case retrofe/opkrun quits with errors, clear graphic VT
|
||||||
termfix_all
|
termfix_all
|
||||||
|
|
|
@ -57,9 +57,9 @@ case ${1} in
|
||||||
# terminate and erase the recorded PID
|
# terminate and erase the recorded PID
|
||||||
cat << EOF >> "${INSTANT_PLAY_FILE}"
|
cat << EOF >> "${INSTANT_PLAY_FILE}"
|
||||||
&
|
&
|
||||||
record_pid \$!
|
pid record \$!
|
||||||
wait \$!
|
wait \$!
|
||||||
erase_pid
|
pid erase
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Now terminate gracefully
|
# Now terminate gracefully
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Uncomment the following line to get debug info
|
||||||
|
#set -x
|
||||||
|
|
||||||
|
SELF="$(basename ${0})"
|
||||||
|
PID_FILE="/var/run/funkey.pid"
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
>&2 echo "Usage: ${SELF} record pid"
|
||||||
|
>&2 echo " ${SELF} erase"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
record_pid() {
|
||||||
|
local pid="${1}"
|
||||||
|
if ! [ ! "${pid}" -ne "${pid}" ]; then
|
||||||
|
>&2 echo "error: ${pid} is not a number"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
echo "${1}" > "${PID_FILE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
erase_pid() {
|
||||||
|
rm -f "${PID_FILE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
case "${1}" in
|
||||||
|
record)
|
||||||
|
if [ ${#} -ne 2 ]; then
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
record_pid "${2}"
|
||||||
|
;;
|
||||||
|
|
||||||
|
erase)
|
||||||
|
if [ ${#} -ne 1 ]; then
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
erase_pid
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
exit 0
|
|
@ -1,12 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Uncomment the following line to get debug info
|
|
||||||
#set -x
|
|
||||||
|
|
||||||
# Check args
|
|
||||||
if [ ${#} -ne 1 ]; then
|
|
||||||
echo "Usage: $(basename ${0}) pid"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo ${1} > /var/run/funkey.pid
|
|
||||||
exit 0
|
|
|
@ -4,7 +4,7 @@
|
||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
PRODSCREENS_VERSION = 428290b
|
PRODSCREENS_VERSION = e58f3a6
|
||||||
PRODSCREENS_SITE_METHOD = git
|
PRODSCREENS_SITE_METHOD = git
|
||||||
PRODSCREENS_SITE = https://github.com/FunKey-Project/FunKey-ProdScreens.git
|
PRODSCREENS_SITE = https://github.com/FunKey-Project/FunKey-ProdScreens.git
|
||||||
PRODSCREENS_SITE_LICENSE = GPL-2.1+
|
PRODSCREENS_SITE_LICENSE = GPL-2.1+
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
RETROFE_VERSION = 77ccbc2
|
RETROFE_VERSION = bc9195f
|
||||||
RETROFE_SITE_METHOD = git
|
RETROFE_SITE_METHOD = git
|
||||||
RETROFE_SITE = https://github.com/FunKey-Project/RetroFE.git
|
RETROFE_SITE = https://github.com/FunKey-Project/RetroFE.git
|
||||||
RETROFE_DEPENDENCIES = gstreamer1 gst1-plugins-base sdl sdl_image sdl_mixer sdl_sound sdl_ttf libglib2 sqlite zlib
|
RETROFE_DEPENDENCIES = gstreamer1 gst1-plugins-base sdl sdl_image sdl_mixer sdl_sound sdl_ttf libglib2 sqlite zlib
|
||||||
|
|
Loading…
Reference in New Issue