From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Reza Alizadeh Majd" Subject: Re: skeleton files in sub-directories Date: Mon, 27 May 2019 11:13:34 +0430 Message-ID: <2a9d46c2-631f-48bd-ab50-47976a68fe7f@www.fastmail.com> References: <87pno5m22l.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:39571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hV9MA-0006zo-Ic for help-guix@gnu.org; Mon, 27 May 2019 02:43:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hV9M9-0004Em-O3 for help-guix@gnu.org; Mon, 27 May 2019 02:43:38 -0400 In-Reply-To: <87pno5m22l.fsf@gnu.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: help-guix@gnu.org Hi,=20 using `computed-file` to create the parent directories for config files,= fixed the issue.=20 Thanks,=20 Reza On Mon, May 27, 2019, at 12:16 AM, Ludovic Court=C3=A8s wrote: > Hi, >=20 > "Reza Alizadeh Majd" skribis: >=20 > > the problem is that some of these skeletons are located in sub-direc= tories, for=20 > > example `~/.local/share/foo/bar.cfg`. and when I run `guix system re= configure` > > I receive errors about missing parent directory (`~/.local/share/foo= ` in this example). > > > > is there any way to create parent directories before copying the ske= leton files?=20 >=20 > I think you can do something like: >=20 > (define dot-config > (compute-file "dot-config-skeleton" > #~(begin > (mkdir #$output) > (mkdir (string-append #$output "/guix")) > =E2=80=A6))) >=20 > and then add it in the list of skeletons like so: >=20 > `(=E2=80=A6 > (".config" ,dot-config)) >=20 > Does that make sense? >=20 > Ludo=E2=80=99. >