Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[ebuild]Wie Samplefiles copieren?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Tue Feb 05, 2013 8:21 pm    Post subject: [ebuild]Wie Samplefiles copieren? Reply with quote

Hallo Zusammen,

Ich versuche gerade ein ebuild zu basteln, was soweit auch schon funktioniert.

Ich habe nun unter "files" ein weiteres Verzeichnis angelegt (examples), das Beispielconfigs enthält, die bei der Installation nach "/etc/foo" copiert werden sollen.

Die Frage ist nun, wie muss ich vorgehen, dass die files copiert werden?
Back to top
View user's profile Send private message
fuchur
Guru
Guru


Joined: 12 Aug 2003
Posts: 578

PostPosted: Wed Feb 06, 2013 1:22 am    Post subject: Re: [ebuild]Wie Samplefiles copieren? Reply with quote

Hi
3PO wrote:
Hallo Zusammen,

Ich versuche gerade ein ebuild zu basteln, was soweit auch schon funktioniert.

Ich habe nun unter "files" ein weiteres Verzeichnis angelegt (examples), das Beispielconfigs enthält, die bei der Installation nach "/etc/foo" copiert werden sollen.

Die Frage ist nun, wie muss ich vorgehen, dass die files copiert werden?

Das was du suchst sollte "insinto" und "doins" sein also
Code:

# !!! dodir /etc/foo # nicht nötig wenn Ordner vorhanden
insinto /etc/foo
doins ${FILESDIR}/examples/*

Schau oder grep dich mal durch die ebuils nach insinto und du wirst genügend Beispiele finde. Noch etwas sollte bei dir "/etc/foo" nicht vorhanden sein
brauchst du auch noch in dem Beispiel am Anfang "dodir" habe das noch einmal mit Ausrufezeichen hinzugefügt ist aber nicht nötig wenn
Ordner vorhanden.

Edit: Habe "newins" durch "doins" ersetzt, ist schon spät ...

MfG
Back to top
View user's profile Send private message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Wed Feb 06, 2013 6:10 pm    Post subject: Reply with quote

THX @ fuchur,

"newins" hatte ich schon versucht, hat aber nicht funktioniert.

"doins" werde ich mal testen. :)

Was genau bewirkt denn "!!!" und was passiert, wenn schon Files vorhanden sind?
Back to top
View user's profile Send private message
fuchur
Guru
Guru


Joined: 12 Aug 2003
Posts: 578

PostPosted: Wed Feb 06, 2013 8:29 pm    Post subject: Reply with quote

Hi
3PO wrote:
THX @ fuchur,

"newins" hatte ich schon versucht, hat aber nicht funktioniert.

"doins" werde ich mal testen. :)

Was genau bewirkt denn "!!!" und was passiert, wenn schon Files vorhanden sind?


Die "!!!! waren nur dafür dich darauf hinzuweisen, also wenn du das benötigst sieht das im ebuild so aus
Code:
dodir /etc/foo


Ich denke es passiert nichts, es gibt nur eine Abbruch wenn nicht vorhanden, bin mir nicht sicher. Probiere es halt aus.

MfG
Back to top
View user's profile Send private message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Wed Feb 06, 2013 8:33 pm    Post subject: Reply with quote

So funktioniert es: ;)

Code:
insinto /etc/foo || die
doins "${FILESDIR}"/examples/* || die


THX nochmal @ fuchur. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum