Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从eclipse运行shell脚本_Eclipse_Bash_Shell - Fatal编程技术网

从eclipse运行shell脚本

从eclipse运行shell脚本,eclipse,bash,shell,Eclipse,Bash,Shell,我想使用Eclipse运行构建脚本(在Ubuntu上) 我使用make工具这样做: build_android: chmod 755 "./build_android.sh" ./build_android.sh 我使用make工具来启动脚本,但是我在一些字符串上得到了“权限拒绝”,比如 ./build_android.sh: 19: function: Permission denied 在 为什么会这样?在Eclipse中启动脚本的解决方案是什么 还有,我为什么要它?我认为在几次单击中启

我想使用Eclipse运行构建脚本(在Ubuntu上)

我使用make工具这样做:

build_android:
chmod 755 "./build_android.sh"
./build_android.sh
我使用make工具来启动脚本,但是我在一些字符串上得到了“权限拒绝”,比如

./build_android.sh: 19: function: Permission denied

为什么会这样?在Eclipse中启动脚本的解决方案是什么

还有,我为什么要它?我认为在几次单击中启动脚本并在环境的控制台视图中查看格式化的脚本输出会更有效率


谢谢。

可能Eclipse使用了其他一些shell来执行脚本,一个无法定义函数的shell。写一行
#/bin/bash
位于脚本顶部。

您可以使用eclipse插件:

第19行在哪里?您可能没有权限在您正在处理的特定目录中执行某些操作。“function build_one”是第19行。如何获取makefile的权限?当我从终端运行脚本时,它确实可以工作,甚至没有sudo。谢谢。事实上,我现在不忙这个问题,但一旦我回到它,我会检查出来。
NDK=/home/student/devtools/android-ndk-r8d
PLATFORM=$NDK/platforms/android-8/arch-arm
PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86

function build_one
{
./configure --target-os=linux \
--prefix=$PREFIX \
--enable-cross-compile \
#and so on...
}