1
我需要安裝沒有sudo的heroku-toolbelt。我試圖在虛擬環境中安裝它。 我修改install.sh文件(修改路徑)在vrtual環境中安裝heroku-toolbelt
> #!/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=\"https://stackoverflow.com/users/user/Documents/mypy/usr/local/heroku/bin:\$PATH\"' >>
> ~/.profile"
> fi
>
> echo "Installation complete" }
但腳本不能正常工作。