summaryrefslogtreecommitdiff
path: root/lib/builder-utils.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/builder-utils.sh')
-rw-r--r--lib/builder-utils.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/builder-utils.sh b/lib/builder-utils.sh
index 4cf2c71..b29afae 100644
--- a/lib/builder-utils.sh
+++ b/lib/builder-utils.sh
@@ -24,6 +24,29 @@ function retrieve_file() {
fi
}
+#############################################
+# void extract_file (src, dst)
+#
+# Description: Extract a file
+#
+# Parameter
+# src: source file to be used
+# dst: path to extract the file
+#
+#############################################
+function extract_file() {
+ local src=$1
+ local dst=$2
+
+ if [ "${EXTRACTWITH}" = "7zip" ]; then
+ 7z x -o$dst $src
+ elif [ "${EXTRACTWITH}" = "unzip" ]; then
+ unzip $src -d $dst
+ else
+ 7z x -o$dst $src
+ fi
+}
+
#############################################
# check if method is available and call it

Powered by Domaintechnik.at | Hosting - Domain - Webspace