From e715c6598343dd15a8652cd22923c4e48aaf1aef Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Sat, 8 Sep 2012 15:34:53 -0400 Subject: [PATCH] updated to handle tar files without compression in unpack, removed old buntar macro that only handled bz2 anyway--unpack is better. --- scripts/archival/unpack.sh | 4 +++- scripts/core/functions.sh | 20 -------------------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/scripts/archival/unpack.sh b/scripts/archival/unpack.sh index 38629ec8..cabb65d3 100644 --- a/scripts/archival/unpack.sh +++ b/scripts/archival/unpack.sh @@ -51,7 +51,9 @@ if [ ! -f "$unpack_file" ]; then fi fi -if [[ $unpack_file =~ .*\.tar\.gz \ +if [[ $unpack_file =~ .*\.tar ]]; then + tar -f $unpack_file +elif [[ $unpack_file =~ .*\.tar\.gz \ || $unpack_file =~ .*\.tar\.bz2 \ || $unpack_file =~ .*\.tgz ]]; then tar -xf $unpack_file diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index 933a7fff..fe56aea6 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -211,26 +211,6 @@ if [ -z "$skip_all" ]; then fi } - # buntar is a long needed uncompressing macro that feeds into tar -x. - # it takes a list of bz2 file names and extracts their contents into - # sequentially numbered directories. - function buntar() { - index=1 - for i in $*; do - mkdir buntar_$index - pushd buntar_$index &>/dev/null - file=$i - # if the filename has no directory component, we will assume it used to - # be above our unzipping directory here. - if [ "$(basename $file)" = $file ]; then - file=../$file - fi - bunzip2 -d -c $file | tar -xf - - popd &>/dev/null - index=$(expr $index + 1) - done - } - # trashes the .#blah files that cvs and svn leave behind when finding conflicts. # this kind of assumes you've already checked them for any salient facts. function clean_cvs_junk() { -- 2.34.1