summaryrefslogtreecommitdiff
path: root/lib/builder-utils.sh
diff options
context:
space:
mode:
authorDaniel Schwager <[email protected]>2012-01-29 14:08:44 (GMT)
committer Daniel Schwager <[email protected]>2012-01-29 14:08:44 (GMT)
commiteaf1219a36f030c682ca7e2ee0546e796e6ed0c4 (patch)
tree59a8bdaed84d2766cd43916e4914d909d5d6edba /lib/builder-utils.sh
parentd46a2af5958f82f1c9676d6c3345e3163b917bb3 (diff)
parent8790bb9eca0bcab985e01e780820be660145725f (diff)
Merge branch 'master' of disconnected-by-peer.at:go-opsi/devtools
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