Last active
May 21, 2019 07:30
-
-
Save T1T4N/99625f01709b0dad0fc1087a3ab42335 to your computer and use it in GitHub Desktop.
Tar with options (rename & exclude)
This file contains hidden or 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
#!/usr/bin/env bash | |
TAR_OPTS=( | |
# Rename file(s) | |
-s ':string/in/path:replacement:g' | |
--exclude 'Contents/Frameworks' | |
) | |
# non-GNU tar | |
tar "${TAR_OPTS[@]}" \ | |
-cvpzf "output/artifact.tar" "App.app" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment