Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Make mackupApplicationsDir func agnostic to mackup's installati…
…on method
- Loading branch information
Showing
5 changed files
with
166 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
[!darwin] skip 'Darwin only' | ||
|
||
# simulate a macports installation of mackup | ||
chmod 755 opt/local/Library/Frameworks/Python.framework/Versions/3.11/bin/mackup | ||
mkdir opt/local/bin | ||
symlink opt/local/bin/mackup -> ../Library/Frameworks/Python.framework/Versions/3.11/bin/mackup | ||
env PATH=$WORK/opt/local/bin:$PATH | ||
|
||
# test that chezmoi mackup add adds normal dotfiles | ||
exec chezmoi mackup add curl | ||
cmp $CHEZMOISOURCEDIR/dot_curlrc golden/dot_curlrc | ||
|
||
# test that chezmoi mackup add adds XDG configuration files | ||
exec chezmoi mackup add vscode | ||
cmp $CHEZMOISOURCEDIR/dot_config/Code/User/settings.json golden/settings.json | ||
|
||
-- golden/dot_curlrc -- | ||
# contents of .curlrc | ||
-- golden/settings.json -- | ||
# contents of .config/Code/User/settings.json | ||
-- home/user/.config/Code/User/settings.json -- | ||
# contents of .config/Code/User/settings.json | ||
-- home/user/.curlrc -- | ||
# contents of .curlrc | ||
-- home/user/.mackup/curl.cfg -- | ||
[application] | ||
name = Curl | ||
|
||
[configuration_files] | ||
.netrc | ||
.curlrc | ||
-- opt/local/Library/Frameworks/Python.framework/Versions/3.11/bin/mackup -- | ||
# mackup binary | ||
-- opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/mackup/applications/vscode.cfg -- | ||
[application] | ||
name = Visual Studio Code | ||
|
||
[configuration_files] | ||
Library/Application Support/Code/User/snippets | ||
Library/Application Support/Code/User/keybindings.json | ||
Library/Application Support/Code/User/settings.json | ||
|
||
[xdg_configuration_files] | ||
Code/User/snippets | ||
Code/User/keybindings.json | ||
Code/User/settings.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
[!darwin] skip 'Darwin only' | ||
|
||
# simulate a pip installation of mackup | ||
chmod 755 usr/local/bin/mackup | ||
# version 3.9 of python without mackup | ||
mkdir usr/local/lib/python3.9/site-packages | ||
env PATH=$WORK/usr/local/bin:$PATH | ||
|
||
# test that chezmoi mackup add adds normal dotfiles | ||
exec chezmoi mackup add curl | ||
cmp $CHEZMOISOURCEDIR/dot_curlrc golden/dot_curlrc | ||
|
||
# test that chezmoi mackup add adds XDG configuration files | ||
exec chezmoi mackup add vscode | ||
cmp $CHEZMOISOURCEDIR/dot_config/Code/User/settings.json golden/settings.json | ||
|
||
-- golden/dot_curlrc -- | ||
# contents of .curlrc | ||
-- golden/settings.json -- | ||
# contents of .config/Code/User/settings.json | ||
-- home/user/.config/Code/User/settings.json -- | ||
# contents of .config/Code/User/settings.json | ||
-- home/user/.curlrc -- | ||
# contents of .curlrc | ||
-- home/user/.mackup/curl.cfg -- | ||
[application] | ||
name = Curl | ||
|
||
[configuration_files] | ||
.netrc | ||
.curlrc | ||
-- usr/local/bin/mackup -- | ||
# mackup binary | ||
-- usr/local/lib/python3.11/site-packages/mackup/applications/vscode.cfg -- | ||
[application] | ||
name = Visual Studio Code | ||
|
||
[configuration_files] | ||
Library/Application Support/Code/User/snippets | ||
Library/Application Support/Code/User/keybindings.json | ||
Library/Application Support/Code/User/settings.json | ||
|
||
[xdg_configuration_files] | ||
Code/User/snippets | ||
Code/User/keybindings.json | ||
Code/User/settings.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
[!darwin] skip 'Darwin only' | ||
|
||
# simulate a pipx installation of mackup | ||
chmod 755 home/.local/pipx/venvs/mackup/bin/mackup | ||
mkdir home/.local/bin | ||
symlink home/.local/bin/mackup -> ../pipx/venvs/mackup/bin/mackup | ||
env PATH=$WORK/home/.local/bin:$PATH | ||
|
||
# test that chezmoi mackup add adds normal dotfiles | ||
exec chezmoi mackup add curl | ||
cmp $CHEZMOISOURCEDIR/dot_curlrc golden/dot_curlrc | ||
|
||
# test that chezmoi mackup add adds XDG configuration files | ||
exec chezmoi mackup add vscode | ||
cmp $CHEZMOISOURCEDIR/dot_config/Code/User/settings.json golden/settings.json | ||
|
||
-- golden/dot_curlrc -- | ||
# contents of .curlrc | ||
-- golden/settings.json -- | ||
# contents of .config/Code/User/settings.json | ||
-- home/.local/pipx/venvs/mackup/bin/mackup -- | ||
# mackup binary | ||
-- home/.local/pipx/venvs/mackup/lib/python3.11/site-packages/mackup/applications/vscode.cfg -- | ||
[application] | ||
name = Visual Studio Code | ||
|
||
[configuration_files] | ||
Library/Application Support/Code/User/snippets | ||
Library/Application Support/Code/User/keybindings.json | ||
Library/Application Support/Code/User/settings.json | ||
|
||
[xdg_configuration_files] | ||
Code/User/snippets | ||
Code/User/keybindings.json | ||
Code/User/settings.json | ||
-- home/user/.config/Code/User/settings.json -- | ||
# contents of .config/Code/User/settings.json | ||
-- home/user/.curlrc -- | ||
# contents of .curlrc | ||
-- home/user/.mackup/curl.cfg -- | ||
[application] | ||
name = Curl | ||
|
||
[configuration_files] | ||
.netrc | ||
.curlrc |