From fe9826fd46759eea30038d3180801b77b693f966 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Tue, 28 May 2013 08:41:11 -0400 Subject: [PATCH] added snarf as a tar ending. these scripts need to have some commonalities extracted, like the extensions for tars and zips. --- scripts/archival/listarch.sh | 1 + scripts/archival/search_arch.sh | 2 +- scripts/archival/unpack.sh | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/archival/listarch.sh b/scripts/archival/listarch.sh index c21d5d68..972295c0 100644 --- a/scripts/archival/listarch.sh +++ b/scripts/archival/listarch.sh @@ -54,6 +54,7 @@ if [[ $archive_file =~ .*\.tar$ \ || $archive_file =~ .*\.oar$ \ || $archive_file =~ .*\.tgz$ \ || $archive_file =~ .*\.ova$ \ + || $archive_file =~ .*\.snarf$ \ ]]; then tar -tf $archive_file | $PAGER elif [[ $archive_file =~ .*\.zip$ \ diff --git a/scripts/archival/search_arch.sh b/scripts/archival/search_arch.sh index 523ccab7..7b2761ff 100644 --- a/scripts/archival/search_arch.sh +++ b/scripts/archival/search_arch.sh @@ -28,7 +28,7 @@ TMPFILE="$(mktemp "$TMP/jarfinding.XXXXXX")" # locate all the archive files under the path. find "$dir" -iname "*.jar" -o -iname "*.zip" -o -iname "*.tar" \ - -o -iname "*.iar" -o -iname "*.oar" -iname "*.bz2" \ + -o -iname "*.iar" -o -iname "*.oar" -o -iname "*.bz2" -o -iname "*.snarf" \ >"$TMPFILE" while read line; do diff --git a/scripts/archival/unpack.sh b/scripts/archival/unpack.sh index 965928c7..6670f489 100644 --- a/scripts/archival/unpack.sh +++ b/scripts/archival/unpack.sh @@ -59,6 +59,7 @@ if [[ $archive_file =~ .*\.tar$ \ || $archive_file =~ .*\.oar$ \ || $archive_file =~ .*\.tgz$ \ || $archive_file =~ .*\.ova$ \ + || $archive_file =~ .*\.snarf$ \ ]]; then tar -xf $archive_file &>/dev/null elif [[ $archive_file =~ .*\.zip$ \ -- 2.34.1