35 lines
954 B
Bash
Executable File
35 lines
954 B
Bash
Executable File
#!/bin/sh
|
|
|
|
install_location="{::install_location::}"
|
|
|
|
if [ ! -d "$install_location/electron_app" ];then
|
|
echo -n "Could not chdir to install location: " >&2
|
|
if [ ! -e "$install_location" ];then
|
|
echo "No such file or directory" >&2
|
|
else
|
|
echo "Not a directory" >&2
|
|
fi
|
|
exit 1
|
|
fi
|
|
cd "$install_location/electron_app"
|
|
if [ -n "${RIOT_USE_ELECTRON}" ];then
|
|
if [ -x "${RIOT_USE_ELECTRON}" ];then
|
|
exec "${RIOT_USE_ELECTRON}" .
|
|
fi
|
|
echo "'${RIOT_USE_ELECTRON}' is not executable!" >&2
|
|
exit 2
|
|
fi
|
|
if [ ! -e "/usr/bin/electron" ];then
|
|
echo "No electron symlink found in '/usr/bin'!" >&2
|
|
echo "Use 'eselect electron' to set the symlink" >&2
|
|
exit 3
|
|
fi
|
|
if [ ! -x "/usr/bin/electron" ];then
|
|
echo "'/usr/bin/electron' is not executable!" >&2
|
|
echo "Did you set the symlink correctly?" >&2
|
|
echo "Use 'eselect electron' to set the symlink" >&2
|
|
exit 4
|
|
fi
|
|
exec /usr/bin/electron . "$@"
|
|
|