summaryrefslogtreecommitdiff
path: root/lib/builder-utils.sh
diff options
context:
space:
mode:
authorMario Fetka <[email protected]>2013-03-28 13:38:45 (GMT)
committer Mario Fetka <[email protected]>2013-03-28 13:38:45 (GMT)
commitd1019ad6b397f438d68005d51de1669d7d470e5c (patch)
treea38895c1bc1b6c5041bd81888d42b465e434fc6a /lib/builder-utils.sh
parent5ccde1ef5827fb35bc3d3968db0f48df072e0153 (diff)
add the possibility to add extra options to the extract process for ex passwort; overwrite; ....
Diffstat (limited to 'lib/builder-utils.sh')
-rw-r--r--lib/builder-utils.sh15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/builder-utils.sh b/lib/builder-utils.sh
index 9ffcb66..4db4adc 100644
--- a/lib/builder-utils.sh
+++ b/lib/builder-utils.sh
@@ -55,25 +55,26 @@ function process_file() {
local format=$1
local src=$2
local dst=$3
+ local option=$4
log_debug "Compression format: $format"
if [ "$format" = "cp" ]; then
cp $src $dst
elif [ "$format" = "7zip" ]; then
- $CMD_7z x -y -o$dst $src
+ $CMD_7z x -y $option -o$dst $src
elif [ "$format" = "unzip" ]; then
- $CMD_unzip -o $src -d $dst
+ $CMD_unzip $option -o $src -d $dst
elif [ "$format" = "unrar" ]; then
- $CMD_unrar x -y $src $dst
+ $CMD_unrar x -y $option $src $dst
elif [ "$format" = "lha" ]; then
- $CMD_lha x -w=$dst $src
+ $CMD_lha x $option -w=$dst $src
elif [ "$format" = "targz" ]; then
- $CMD_tar xzvf $src -C $dst
+ $CMD_tar xzvf $option $src -C $dst
elif [ "$format" = "tarbz2" ]; then
- $CMD_tar xjvf $src -C $dst
+ $CMD_tar xjvf $option $src -C $dst
elif [ "$format" = "cab" ]; then
- $CMD_cabextract -d $dst $src
+ $CMD_cabextract $option -d $dst $src
else
fatal_error "Unknown compression format: $format"
fi

Powered by Domaintechnik.at | Hosting - Domain - Webspace