jojonki / key-value-memory-networks

Key-Value Memory Networks for Directly Reading Documents, Alexander Miller, Adam Fisch, Jesse Dodge, Amir-Hossein Karimi, Antoine Bordes, Jason Weston https://arxiv.org/abs/1606.03126
57 stars 18 forks source link

Fix tar error in download script on Mac #2

Closed samhavens closed 6 years ago

samhavens commented 6 years ago

On Mac (and any system using BSD Tar instead of GNU Tar, running ./download.sh errored before extracting with:

tar: Option --warning=no-unknown-keyword is not supported
Usage:
  List:    tar -tf <archive-filename>
  Extract: tar -xf <archive-filename>
  Create:  tar -cf <archive-filename> [filenames...]
  Help:    tar --help

This PR fixes that by checking to see if tar -v contains the phrase gnu, and only if it does including --warning=no-unknown-keyword.

Also, there was a typo, it originally said --warning=no-unknown-keywor

jojonki commented 6 years ago

@samhavens Thank you for your contribution!