update worktree command with copy-on-write of elixir stuff
This commit is contained in:
parent
a96c6dae4e
commit
25e362622e
1 changed files with 25 additions and 2 deletions
|
@ -16,7 +16,30 @@ function worktree
|
||||||
git worktree add -b "$branchname" "../$dirname"
|
git worktree add -b "$branchname" "../$dirname"
|
||||||
end
|
end
|
||||||
|
|
||||||
if test -d "node_modules"
|
# Node projects
|
||||||
cp -Rc node_modules ../$dirname/node_modules
|
# if test -e "package.json"
|
||||||
|
# if test -d "node_modules"
|
||||||
|
# cp -Rc node_modules ../$dirname/node_modules
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
|
||||||
|
# Elixir projects
|
||||||
|
if test -e "mix.exs" and
|
||||||
|
if test -d "_build"
|
||||||
|
cp -cR _build ../$dirname/
|
||||||
|
end
|
||||||
|
if test -d "deps"
|
||||||
|
cp -cR deps ../$dirname/
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# typically untracked files
|
||||||
|
if test -e ".envrc"
|
||||||
|
cp .envrc ../$dirname/
|
||||||
|
end
|
||||||
|
if test -e ".npmrc"
|
||||||
|
cp .npmrc ../$dirname/
|
||||||
|
end
|
||||||
|
|
||||||
|
cd ../$dirname
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in a new issue