Skip to content

Instantly share code, notes, and snippets.

@icy
Created November 20, 2017 23:20
Show Gist options
  • Save icy/bc283a3f177cc16306309fb7781d5189 to your computer and use it in GitHub Desktop.
Save icy/bc283a3f177cc16306309fb7781d5189 to your computer and use it in GitHub Desktop.
aftershot2.sh
#!/bin/bash
#
# AfterShot Pro startup script
# make symlinks to this script anywhere in your $PATH
# See also: http://forum.corel.com/EN/viewtopic.php?f=94&t=57338
FindPath()
{
if [ "`readlink "$0"`" = "" ]; then
pushd $(dirname "$0") >/dev/null
FP="$(pwd)"
popd >/dev/null
echo "${FP}"
else
FP=$(readlink "$0"|sed -e "s/ /\\\ /g")
echo `dirname "${FP}"`
fi
}
INSTALL_PATH="/opt/AfterShotPro2"
LD_LIBRARY_PATH=${INSTALL_PATH}/lib:${LD_LIBRARY_PATH}
# XLIB_SKIP_ARGB_VISUALS=0
export LD_LIBRARY_PATH
export XLIB_SKIP_ARGB_VISUALS
echo "Install Path: " ${INSTALL_PATH}
echo "LD_PATH: " $LD_LIBRARY_PATH
echo "XLIB_SKIP_ARGB_VISUALS:" $XLIB_SKIP_ARGB_VISUALS
unset XLIB_SKIP_ARGB_VISUALS
if [ -x "${INSTALL_PATH}/bin/AfterShotPro" ]
then
cd "${INSTALL_PATH}/bin"
#ldd "./AfterShotPro"
exec "${INSTALL_PATH}/bin/AfterShotPro" "$@"
#echo "all is well in the world"
else
echo "didn't run it (obviously)"
fi
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment