summaryrefslogtreecommitdiff
path: root/lib/builder-utils.sh
diff options
context:
space:
mode:
authorMario Fetka <[email protected]>2012-01-29 08:11:01 (GMT)
committer Mario Fetka <[email protected]>2012-01-29 08:11:01 (GMT)
commit2f44e3864cd68a46aa7687c13045d073315b4cc4 (patch)
treeae4bcbf0da766a07854affe237dbfbf200689264 /lib/builder-utils.sh
parent8d6eb9c586ab9d4d59659f67a6ffbc33a7c8a7f6 (diff)
add support for source packages in archives
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