在virtualenv中安装heroku-toolbelt

时间:2014-03-13 16:03:13

标签: virtualenv heroku-toolbelt

我需要在没有sudo的情况下安装heroku-toolbelt。我想在虚拟环境中安装它。 我修改了install.sh文件(更改路径)

> #!/bin/bash {
>     HEROKU_CLIENT_URL="https://s3.amazonaws.com/assets.heroku.com/heroku-client/heroku-client.tgz"
> 
>     echo "This script requires superuser access to install software."
>     echo "You will be prompted for your password by sudo."
> 
>     # clear any previous sudo permission
>     #sudo -k
> 
>     # run inside sudo
>     #sudo sh <<SCRIPT
> 
>   # download and extract the client tarball   rm -rf
> /users/user/Documents/mypy/usr/local/heroku   mkdir -p
> /users/user/Documents/mypy/usr/local/heroku   cd
> /users/user/Documents/mypy/usr/local/heroku
> 
>   if [[ -z "$(which wget)" ]]; then
>     curl -s $HEROKU_CLIENT_URL | tar xz   else
>     wget -qO- $HEROKU_CLIENT_URL | tar xz   fi
> 
>   mv heroku-client/* .   rmdir heroku-client
> 
> SCRIPT
> 
>     # remind the user to add to $PATH
>     if [[ ":$PATH:" != *":/users/user/Documents/mypy/usr/local/heroku/bin:"* ]]; then     echo "Add the Heroku CLI to your PATH using:"   echo "$ echo
> 'PATH=\"/users/user/Documents/mypy/usr/local/heroku/bin:\$PATH\"' >>
> ~/.profile"
>     fi
> 
>     echo "Installation complete" }

但脚本无效。

1 个答案:

答案 0 :(得分:1)

当使用PuTTY作为SSH在unbuntu vitural env中安装工具带时,我遇到了类似的问题。在安装之前,我使用命令sudo -k在粘贴链接之前清除权限。我知道这不应该是一个问题,因为它是脚本,但它有效。我希望它有所帮助。