相关疑难解决方法(0)

如何在Makefile中获取脚本?

有没有更好的方法从makefile中获取设置env变量的脚本?

FLAG ?= 0
ifeq ($(FLAG),0)
export FLAG=1
/bin/myshell -c '<source scripts here> ; $(MAKE) $@'
else
...targets...
endif
Run Code Online (Sandbox Code Playgroud)

shell makefile

71
推荐指数
6
解决办法
6万
查看次数

如何在makefile中使用virtualenv

我想在处理指定的virtualenv时执行几个操作.

例如命令

make install
Run Code Online (Sandbox Code Playgroud)

相当于

source path/to/virtualenv/bin/activate
pip install -r requirements.txt
Run Code Online (Sandbox Code Playgroud)

可能吗?

makefile virtualenv

34
推荐指数
7
解决办法
2万
查看次数

帮助基本的shell脚本./ bin/sh:source:not found

我的cron:

45 10 * * * source /home/ThinkCode/Test/hello.sh
Run Code Online (Sandbox Code Playgroud)

hello.sh:

#!/bin/bash
echo "helloworld"
Run Code Online (Sandbox Code Playgroud)

它通过电子邮件向我发送错误:

/bin/sh: source: not found
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么?它是配置/环境特定的,所以谷歌搜索没有多大帮助!谢谢..

bash shell cron

22
推荐指数
2
解决办法
2万
查看次数

标签 统计

makefile ×2

shell ×2

bash ×1

cron ×1

virtualenv ×1