/bin/sh: pushd: not found

前端 未结 11 677
借酒劲吻你
借酒劲吻你 2020-12-13 11:31

I am doing the following inside a make file

pushd %dir_name%

and i get the following error

/bin/sh : pushd : not foun         


        
11条回答
  •  悲哀的现实
    2020-12-13 12:26

    A workaround for this would be to have a variable get the current working directory. Then you can cd out of it to do whatever, then when you need it, you can cd back in.

    i.e.

    oldpath=`pwd`
    #do whatever your script does
    ...
    ...
    ...
    # go back to the dir you wanted to pushd
    cd $oldpath
    

提交回复
热议问题