Skip to content

Is it possible to put 'util/library' shell scripts in .chezmoiscripts dir? #3506

Answered by kquinsland
kquinsland asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the reply!

I am already using the chezmoiroot trick :) and your proposed layout is exactly what I tried before opening this thread. Unfortunately, it doesn't work since each run_*.sh has something to the effect of source ../../scripts/utils.sh at the top but this relative file include path breaks when chezmoi copies the run_* scripts:

❯ cz apply
/tmp/3963292091.00-install-pre-requisites.sh: line 12: ../../scripts/utils.sh: No such file or directory
chezmoi: exit status 1

Versus when the scripts/utils.sh lives inside of .chezmoiscripts`:

❯ cz apply
chezmoi: $mySourceDirPath/home/.chezmoiscripts/scripts/utils.sh: not a script

I was able to work around the issue by changing the s…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@kquinsland
Comment options

Comment options

You must be logged in to vote
7 replies
@kquinsland
Comment options

Answer selected by halostatue
@halostatue
Comment options

@kquinsland
Comment options

@Lockszmith-GH
Comment options

@halostatue
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants