#!/bin/bash -e

VERSION=$2
FILE=$3

# Resolve symbolic links
FILE=`readlink -f $FILE`

gunzip $FILE

TARFILE=${FILE%.gz}


# Remove all files starting ._
tar -f $TARFILE --wildcards --delete "*/._*"

gzip $TARFILE

echo "Repack complete."
