Skip to content

Instantly share code, notes, and snippets.

@aaronbassett
Created February 1, 2013 12:39
Show Gist options
  • Save aaronbassett/4691073 to your computer and use it in GitHub Desktop.
Save aaronbassett/4691073 to your computer and use it in GitHub Desktop.
#!/bin/bash
# This is untested but you get the basic idea
# Why? Cause fuck dependencies that's why ;)
if [[ $# -lt 1 ]]; then
echo "Usage: $0 INFILE"
exit 1
fi
if [[ $1 =~ \.tar\.bz2$ ]] ; then tar xfj $1; fi
if [[ $1 =~ \.tar\.gz$ ]] ; then tar xzf $1; fi
if [[ $1 =~ \.tar$ ]] ; then tar xf $1; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment