about summary refs log tree commit diff
path: root/pkgs/build-support/setup-hooks/gog-unpack.sh
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2018-02-04 21:31:39 +0800
committerPeter Hoeg <peter@hoeg.com>2018-02-12 22:28:06 +0800
commit126cc690ac291e2290f3e151866b2bc37c178c8d (patch)
tree9ff1d3753a6fe5a348f618134786f961323b9166 /pkgs/build-support/setup-hooks/gog-unpack.sh
parent646abe9b29ee7900c7942a25125861c4291db4eb (diff)
build-support gogUnpackHook: support for unpacking games from gog.com
Diffstat (limited to 'pkgs/build-support/setup-hooks/gog-unpack.sh')
-rw-r--r--pkgs/build-support/setup-hooks/gog-unpack.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/build-support/setup-hooks/gog-unpack.sh b/pkgs/build-support/setup-hooks/gog-unpack.sh
new file mode 100644
index 0000000000000..559b543fadfce
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/gog-unpack.sh
@@ -0,0 +1,11 @@
+unpackPhase="unpackGog"
+
+unpackGog() {
+    runHook preUnpackGog
+
+    innoextract --silent --extract --exclude-temp "${src}"
+
+    find . -depth -print -execdir rename -f 'y/A-Z/a-z/' '{}' \;
+
+    runHook postUnpackGog
+}