On Thu, Oct 29, 2020 at 05:24:12PM +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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sparrow/3-code/dev-env b/sparrow/3-code/dev-env index 11c7fb0..7703786 100755 --- a/sparrow/3-code/dev-env +++ b/sparrow/3-code/dev-env @@ -38,4 +38,4 @@ EOF
source /etc/os-release
-. $(dirname ${BASH_SOURCE[0]})/os/${ID}
you should show an comments about ID.
+[ -f "${ID}" ] && . $(dirname ${BASH_SOURCE[0]})/os/${ID}
perhaps you can replace like this:
. $(dirname ${BASH_SOURCE[0]})/os/${ID} => source $(dirname ${BASH_SOURCE[0]})/os/${ID}
Thanks, Liushaofei
-- 2.23.0