3 # This tool unpacks a full update package generated by make_full_update.sh
7 # -----------------------------------------------------------------------------
8 # By default just assume that these tools exist on our path
12 # -----------------------------------------------------------------------------
15 echo "Usage: $(basename $0) [OPTIONS] ARCHIVE"
26 echo "The contents of ARCHIVE will be unpacked into the current directory."
29 echo " -h show this help text"
34 # -----------------------------------------------------------------------------
38 # Generate a list of all files in the archive.
39 files
=($
($MAR -t "$archive" | cut
-d' ' -f3))
41 # Extract the files, creating subdirectories. The resulting files are bzip2
42 # compressed, so we need to walk the list of files, and decompress them.
45 num_files
=${#files[*]}
47 # Skip first "file" since it is actually the column header string "NAME" that
48 # does not correspond to an actual file in the archive.
49 for ((i
=1; $i<$num_files; i
=$i+1)); do
52 echo " decompressing $f"