[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 +}