-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detect archive format from content if needed
- Loading branch information
Showing
3 changed files
with
103 additions
and
13 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,38 @@ | ||
[windows] skip 'UNIX only' | ||
|
||
httpd www | ||
|
||
# test that chezmoi sniffs the format of tar files | ||
exec tar -cf www/archive.tar archive/ | ||
cp www/archive.tar www/archive | ||
chezmoi apply --force --refresh-externals | ||
cmp $HOME/.dir/dir/file golden/dir/file | ||
|
||
# test that chezmoi sniffs the format of tar.bz2 files | ||
exec tar -cjf www/archive.tar.bz2 archive/ | ||
cp www/archive.tar.bz2 www/archive | ||
chezmoi apply --force --refresh-externals | ||
cmp $HOME/.dir/dir/file golden/dir/file | ||
|
||
# test that chezmoi sniffs the format of tar.gz files | ||
exec tar -czf www/archive.tar.gz archive/ | ||
cp www/archive.tar.gz www/archive | ||
chezmoi apply --force --refresh-externals | ||
cmp $HOME/.dir/dir/file golden/dir/file | ||
|
||
# test that chezmoi sniffs the format of zip files | ||
exec zip -r www/archive.zip archive | ||
cp www/archive.zip www/archive | ||
chezmoi apply --force --refresh-externals | ||
cmp $HOME/.dir/dir/file golden/dir/file | ||
|
||
-- archive/dir/file -- | ||
# contents of dir/file | ||
-- golden/dir/file -- | ||
# contents of dir/file | ||
-- home/user/.local/share/chezmoi/.chezmoiexternal.yaml -- | ||
.dir: | ||
type: archive | ||
url: "{{ env "HTTPD_URL" }}/archive" | ||
stripComponents: 1 | ||
-- www/.keep -- |