如果是/ bin / sh,则为一个衬垫

时间:2018-02-22 15:30:20

标签: shell sh

我确实意识到我已经为bash编写了代码。但是在这种情况下它使用/ bin / sh。我该如何重写呢。

此:

Step 8/17 : RUN if [ "$KEY" == "" ] ; then echo "SSH key is not set, aborting" ; exit 1 ; else echo "SSH key is set" ; fi

结果:

/bin/sh: 1: [: unexpected operator

而且:

Step 7/15 : RUN if test "$KEY" == "" ; then echo "SSH key is not set, aborting" ; exit 1 ; else echo "SSH key is set" ; fi

结果:

/bin/sh: 1: test: unexpected operator

0 个答案:

没有答案