X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Farchival%2Flist_arch.sh;h=2d5b6b1b79baeebb872c72f33b56765b5efc083a;hb=8064b3bda39bcb17d8550006a2e99cd9e5cfadee;hp=eba1fc8f4e4fa7afc76227d866b63a45414228ab;hpb=dfe6c3aedd3487a00acf94683163be7ed0baa6da;p=feisty_meow.git diff --git a/scripts/archival/list_arch.sh b/scripts/archival/list_arch.sh index eba1fc8f..2d5b6b1b 100644 --- a/scripts/archival/list_arch.sh +++ b/scripts/archival/list_arch.sh @@ -47,6 +47,7 @@ if [ ! -f "$archive_file" ]; then fi fi +save_err=1 if [[ $archive_file =~ .*\.tar$ \ || $archive_file =~ .*\.tar\.gz$ \ || $archive_file =~ .*\.tar\.bz2$ \ @@ -57,6 +58,7 @@ if [[ $archive_file =~ .*\.tar$ \ || $archive_file =~ .*\.snarf$ \ ]]; then tar -tf $archive_file | $PAGER + save_err=${PIPESTATUS[0]} elif [[ $archive_file =~ .*\.zip$ \ || $archive_file =~ .*\.epub$ \ || $archive_file =~ .*\.odt$ \ @@ -64,4 +66,17 @@ elif [[ $archive_file =~ .*\.zip$ \ || $archive_file =~ .*\.war$ \ ]]; then unzip -v $archive_file | $PAGER + save_err=${PIPESTATUS[0]} +elif [[ "$archive_file" =~ .*\.7z$ ]]; then + 7z l "$archive_file" | $PAGER + save_err=${PIPESTATUS[0]} +elif [[ "$archive_file" =~ .*\.rar$ ]]; then + rar l "$archive_file" | $PAGER + save_err=${PIPESTATUS[0]} fi + +if [ $save_err -ne 0 ]; then + echo "There was a failure reported while listing: $archive_file" + exit 1 +fi +