|
@@ -1,7 +1,7 @@
|
|
|
#!/bin/bash
|
|
#!/bin/bash
|
|
|
# a command line utility intended to simplify bulk decompression
|
|
# a command line utility intended to simplify bulk decompression
|
|
|
# by automating a pool sized by the processor of parallel operations
|
|
# by automating a pool sized by the processor of parallel operations
|
|
|
-# each of which creates a folder, decompresses, and if successful
|
|
|
|
|
|
|
+# each of which creates a directory, decompresses, and if successful
|
|
|
# removes the compressed file, finally checking each directory and
|
|
# removes the compressed file, finally checking each directory and
|
|
|
# pulling out single items to avoid redundant parent directories.
|
|
# pulling out single items to avoid redundant parent directories.
|
|
|
|
|
|
|
@@ -36,7 +36,7 @@ extract_locally() {
|
|
|
# cleanup
|
|
# cleanup
|
|
|
rm "$1"
|
|
rm "$1"
|
|
|
|
|
|
|
|
- # @todo: fix redundant parent folders
|
|
|
|
|
|
|
+ # fix redundant parent directories
|
|
|
if [ $(find "$name" -mindepth 1 -maxdepth 1 | wc -l) -eq 1 ]; then
|
|
if [ $(find "$name" -mindepth 1 -maxdepth 1 | wc -l) -eq 1 ]; then
|
|
|
mv "$name" "${name}.tmp"
|
|
mv "$name" "${name}.tmp"
|
|
|
mv "${name}.tmp"/* .
|
|
mv "${name}.tmp"/* .
|