On Thu, Oct 29, 2020 at 09:36:59PM +0800, Xu Xijian wrote:
On Thu, Oct 29, 2020 at 07:45:56PM +0800, Zhang Yale wrote:
[Why] when run dev-env in centos system error like this: ./dev-env:line 41: ./os/centos: No such file or directory.
Signed-off-by: Zhang Yale zhangyale3@huawei.com
sparrow/3-code/dev-env | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sparrow/3-code/dev-env b/sparrow/3-code/dev-env index 11c7fb0..62de23d 100755 --- a/sparrow/3-code/dev-env +++ b/sparrow/3-code/dev-env @@ -38,4 +38,7 @@ EOF
source /etc/os-release
-. $(dirname ${BASH_SOURCE[0]})/os/${ID} +os_id=$(dirname ${BASH_SOURCE[0]})/os/${ID} +[ -f "${os_id}" ] && {
- . os_id
+}
We can write into 1 line here: [ -f "${os_id}" ] && . os_id
Thanks, Xijian
Good! I got it.
Thanks, Yale