Note: pre was run before env was set up and post still with env set,
now both are ran with env (PATH and LD_LIBRARY_PATH) set, so things may
break. This is unlikely though as almost nobody is using pre/post scripts.
export XDG_DATA_HOME="$HOME"
export XDG_CACHE_HOME="$HOME"
export XDG_DATA_HOME="$HOME"
export XDG_CACHE_HOME="$HOME"
+ if [ -e "${APPDATADIR}/PND_pre_script.sh" ]; then
+ echo "Starting user configured pre-script ${APPDATADIR}/PND_pre_script.sh"
+ . ${APPDATADIR}/PND_pre_script.sh # Sourcing so it can shared vars with post-script ;)
+ echo "${APPDATADIR}/PND_pre_script.sh is done"
+ fi
+
if [ "$DOTSLASH" = "true" ]; then
"$EXENAME" $ARGUMENTS "$@"
else
if [ "$DOTSLASH" = "true" ]; then
"$EXENAME" $ARGUMENTS "$@"
else
#the app could have exited now, OR it went into bg, we still need to wait in that case till it really quits!
LD_LIBRARY_PATH= PATH="$REAL_PATH" PND_WaitForExit "$EXENAME"
#the app could have exited now, OR it went into bg, we still need to wait in that case till it really quits!
LD_LIBRARY_PATH= PATH="$REAL_PATH" PND_WaitForExit "$EXENAME"
+ if [ -e "${APPDATADIR}/PND_post_script.sh" ]; then
+ echo "Starting user configured post-script ${APPDATADIR}/PND_post_script.sh"
+ . ${APPDATADIR}/PND_post_script.sh
+ echo "${APPDATADIR}/PND_post_script.sh is done"
+ fi
+
# clean up to avoid any effects of the .pnd on the remaining parts of this script
unset LD_LIBRARY_PATH
export HOME="$REAL_HOME"
# clean up to avoid any effects of the .pnd on the remaining parts of this script
unset LD_LIBRARY_PATH
export HOME="$REAL_HOME"
fi
oPWD=$(pwd)
old_fb0_geometry=$(fbset -fb /dev/fb0 -s | grep geometry | awk '{print $2, $3, $4, $5, $6}')
fi
oPWD=$(pwd)
old_fb0_geometry=$(fbset -fb /dev/fb0 -s | grep geometry | awk '{print $2, $3, $4, $5, $6}')
- if [ -e "${APPDATADIR}/PND_pre_script.sh" ]; then
- PND_BeginTask "Starting user configured pre-script"
- . ${APPDATADIR}/PND_pre_script.sh # Sourcing so it can shared vars with post-script ;)
- PND_EndTask
- fi
PND_BeginTask "Starting the application ( $EXENAME $ARGUMENTS "$@")"
runApp "$@"
PND_EndTask
PND_BeginTask "Starting the application ( $EXENAME $ARGUMENTS "$@")"
runApp "$@"
PND_EndTask
- if [ -e "${APPDATADIR}/PND_post_script.sh" ]; then
- PND_BeginTask "Starting user configured post-script"
- . ${APPDATADIR}/PND_post_script.sh
- PND_EndTask
- fi
cd $oPWD
if [ $CLOSE_X ]; then
PND_BeginTask "Restarting X"
cd $oPWD
if [ $CLOSE_X ]; then
PND_BeginTask "Restarting X"