Browse Source

Merge pull request #305 from jfsiii/fix-correct-contributing-md

Don't assume `/usr/local`. Use `brew --prefix`.
Paul Hinze 12 years ago
parent
commit
a5a48523bf
  1. 16
      CONTRIBUTING.md

16
CONTRIBUTING.md

@ -71,17 +71,17 @@ end
In order to find out the checksum for the file, you need to download the file In order to find out the checksum for the file, you need to download the file
and then: and then:
``` bash ``` bash
$ curl -OL http://example-server.com/path/to/file/my-app.dmg $ curl -OL http://example-server.com/path/to/file/my-app.dmg
# Download the file that contains the application # Download the file that contains the application
$ shasum my-app.dmg $ shasum my-app.dmg
# Calculate SHA-1 sum for the downloaded file # Calculate SHA-1 sum for the downloaded file
``` ```
Some developers (like Mozilla) and hosts (like Sourceforge) provide checksums, Some developers (like Mozilla) and hosts (like Sourceforge) provide checksums,
so you can use those directly, without needing to download the file separately. so you can use those directly, without needing to download the file separately.
In addition to `sha1` you can provide the checksum with `md5`, `sha256`, or `sha512` In addition to `sha1` you can provide the checksum with `md5`, `sha256`, or `sha512`
in the same manner. Use commands `md5 my-app.dmg` or `shasum -a 256 my-app.dmg` in the same manner. Use commands `md5 my-app.dmg` or `shasum -a 256 my-app.dmg`
to obtain these checksums. to obtain these checksums.
@ -93,14 +93,14 @@ This is all you need to do to write a Cask!
## Testing your new Cask ## Testing your new Cask
When Casks are installed, they are searched in `/usr/local/Library/Taps`. You When Casks are installed, they are searched in `` `brew --prefix`/Library/Taps ``. You
can replace the files in folder `phinze-cask` but you are recommended to make can replace the files in folder `phinze-cask` but you are recommended to make
your own folder in which you place the tested Casks. your own folder in which you place the tested Casks.
```bash ```bash
$ mkdir -p /usr/local/Library/Taps/my-casks/Casks $ mkdir -p `brew --prefix`/Library/Taps/my-casks/Casks
# Create directory in which the tested Casks are placed # Create directory in which the tested Casks are placed
$ ln -s ~/homebrew-cask/Casks/my-app.rb /usr/local/Library/Taps/my-casks/Casks $ ln -s ~/homebrew-cask/Casks/my-app.rb `brew --prefix`/Library/Taps/my-casks/Casks
# Create a symbolic link to the Cask you created # Create a symbolic link to the Cask you created
``` ```
@ -110,7 +110,7 @@ install it: `brew cask install my-app`.
Did it install? If yes, you can continue with submitting a pull request. If Did it install? If yes, you can continue with submitting a pull request. If
something went wrong, `brew cask uninstall my-app` and edit your Cask in something went wrong, `brew cask uninstall my-app` and edit your Cask in
`~/homebrew-cask/Casks/my-app.rb` or whereever you placed it. Since you `~/homebrew-cask/Casks/my-app.rb` or whereever you placed it. Since you
created a symbolic link in `/usr/local/Library/Taps/my-casks/Casks`, changes created a symbolic link in `` `brew --prefix`/Library/Taps/my-casks/Casks ``, changes
are automatically reflected in there, so you can directly try installing after are automatically reflected in there, so you can directly try installing after
those changes. those changes.

Loading…
Cancel
Save