An executable that contains data
Asked Answered
A

1

6

I've been thinking about a way to deploy configurations on a linux system, Specifically dotfiles.

I would really like to somehow compile all the dotfiles into one executable that, when executed, deploys them in the right place. Here comes the tricky part: the files are not available on the system where the executable is to be executed and I only want to 'ship' the executable. Nothing else.

Is there a way to put the files into the executable, so that they can be safely extracted later?

(I'm trying to build this in Haskell, but any language will do for the POC.))

Adumbral answered 2/6, 2015 at 8:54 Comment(0)
P
8

You can do this using Template Haskell. Check out the file-embed package.

Pasteup answered 2/6, 2015 at 9:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.