summaryrefslogtreecommitdiff
path: root/pkg/docker/scripts/libyaml-dist.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/docker/scripts/libyaml-dist.sh')
-rwxr-xr-xpkg/docker/scripts/libyaml-dist.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/pkg/docker/scripts/libyaml-dist.sh b/pkg/docker/scripts/libyaml-dist.sh
new file mode 100755
index 0000000..94e7696
--- /dev/null
+++ b/pkg/docker/scripts/libyaml-dist.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+
+set -ex
+
+cp -r /output/libyaml.git /tmp/
+cd /tmp/libyaml.git
+./bootstrap
+./configure
+make dist
+
+# get the tarball filename
+tarballs=(yaml-*.tar.gz)
+tarball=${tarballs[0]:?}
+dirname=${tarball/.tar.gz/}
+
+# Copy to output dir
+cp "$tarball" /output
+
+# Create zip archive
+cd /tmp
+cp "/output/$tarball" .
+tar xvf "$tarball"
+zip -r "/output/$dirname.zip" "$dirname"