Skip to content

Instantly share code, notes, and snippets.

@powdahound
Created September 11, 2010 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save powdahound/575380 to your computer and use it in GitHub Desktop.
Save powdahound/575380 to your computer and use it in GitHub Desktop.
GitHub tarball extract & cd
GitHub tarball downloads contain a folder inside named: <user>-<project>-<hash>
$ tag='v1.3.12'
$ curl -sL http://github.com/antirez/redis/tarball/$tag -o redis-$tag.tar.gz
$ dir=$(tar zxvf redis-$tag.tar.gz | tail -1 | cut -d "/" -f1)
$ cd $dir
$ make
Is there a cleaner way to cd to the directory inside the tarball?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment