summarylogtreecommitdiffstats
path: root/tarballroot-hook
diff options
context:
space:
mode:
authorMatthew Hiles2016-04-15 16:08:31 -0400
committerMatthew Hiles2016-04-15 16:08:31 -0400
commit7519ba65e03f1066f76cb1cb9be9e039c915b371 (patch)
tree116777b9ccb7d2476bd523ea5d3c4fe426da1d2f /tarballroot-hook
downloadaur-mkinitcpio-tarball-utils.tar.gz
initial commit
Diffstat (limited to 'tarballroot-hook')
-rw-r--r--tarballroot-hook14
1 files changed, 14 insertions, 0 deletions
diff --git a/tarballroot-hook b/tarballroot-hook
new file mode 100644
index 000000000000..6ef5243fb3d9
--- /dev/null
+++ b/tarballroot-hook
@@ -0,0 +1,14 @@
+# vim: set ft=sh:
+run_hook() {
+ if [ "${root}" = "tarball" ]; then
+ # set mount handler
+ mount_handler="tarball_mount_handler"
+ fi
+}
+
+tarball_mount_handler() {
+ mount -t tmpfs root "$1"
+ wget -O- ${tarball} | tar -Jx -C "$1"
+}
+
+# vim: set ft=sh ts=4 sw=4 et: