
How about add "" here?
lys@crystal /c/compass-ci% ab= lys@crystal /c/compass-ci% cd "$ab" file not exist; cd into parent dir instead lys@crystal /c/compass-ci% ab= lys@crystal /c/compass-ci% cd "$ab/c/compass-ci" lys@crystal /c/compass-ci%
if cd $xxx/xxx, use "" not work.
wcl@z9 ~% ab=compass-ci wcl@z9 ~% cd $ab wcl@z9 ~/compass-ci% wcl@z9 ~% cd "$ab/doc" wcl@z9 ~/compass-ci/doc%
It's also can work.
ab为空的时候呢,cd的时候加了双引号也不会报错呀,跟不加没有区别 Thanks, Yinsi
Thanks, Chenglong
Thanks, Yinsi
cd "$ROOTFS_DIR/boot"
Thanks, Chenglong
ln -fs $ROOTFS_VMLINUZ vmlinuz diff --git a/sparrow/4-docker/buildall b/sparrow/4-docker/buildall index ca4406b..f24226c 100755 --- a/sparrow/4-docker/buildall +++ b/sparrow/4-docker/buildall @@ -30,7 +30,7 @@ do_one() [ -n "$LKP_SRC" ] && log_info "start build $container." mkdir $tmpdir/$container_name 2>/dev/null && ( - cd $container + cd "$container" [ "$container_name" == 'ssh-r' ] && exit docker images | grep -wq "$container_name" if [ "$?" == 0 ] && [ "$action" != "reboot" ]; then -- 2.23.0