提交 8f3600bc 编写于 作者: yanghye's avatar yanghye

energy command-line tools: linux-arm package 添加startup.sh, run.sh,

上级 38b88a39
#!/bin/sh
message()
{
TITLE="Cannot start GoLand"
if [ -n "$(command -v zenity)" ]; then
zenity --error --title="$TITLE" --text="$1" --no-wrap
elif [ -n "$(command -v kdialog)" ]; then
kdialog --error "$1" --title "$TITLE"
elif [ -n "$(command -v notify-send)" ]; then
notify-send "ERROR: $TITLE" "$1"
elif [ -n "$(command -v xmessage)" ]; then
xmessage -center "ERROR: $TITLE: $1"
else
printf "ERROR: %s\n%s\n" "$TITLE" "$1"
fi
}
if [ -z "$ENERGY_HOME" ] || [ ! -d "$ENERGY_HOME" ]; then
message "No CEF found. Please make sure \$ENERGY_HOME point to valid installation."
exit 1
fi
LIBCEF="$ENERGY_HOME/libcef.so"
if [ ! -e "$LIBCEF" ]; then
message "No CEF libcef.so found. Please make sure \$ENERGY_HOME point to valid installation."
exit 1
fi
# fix: linux arm: Error loading libcef.so
# temp LD_PRELOAD, Load libcef.so correctly
export LD_PRELOAD="$LIBCEF"
# go run xxx.go
exec go run $1
#!/bin/sh
message()
{
TITLE="Cannot start GoLand"
if [ -n "$(command -v zenity)" ]; then
zenity --error --title="$TITLE" --text="$1" --no-wrap
elif [ -n "$(command -v kdialog)" ]; then
kdialog --error "$1" --title "$TITLE"
elif [ -n "$(command -v notify-send)" ]; then
notify-send "ERROR: $TITLE" "$1"
elif [ -n "$(command -v xmessage)" ]; then
xmessage -center "ERROR: $TITLE: $1"
else
printf "ERROR: %s\n%s\n" "$TITLE" "$1"
fi
}
# install path libcef.so
LIBCEF="{{.CEFPATH}}/libcef.so"
if [ ! -e "$LIBCEF" ]; then
message "No CEF libcef.so found. Please make sure CEF point to valid installation."
exit 1
fi
# fix: linux arm: Error loading libcef.so
# temp LD_PRELOAD, Load libcef.so correctly
export LD_PRELOAD="$LIBCEF"
# Execution File Name
exec {{.EXECUTE}}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册