Skip to content

Instantly share code, notes, and snippets.

@T1T4N
Last active May 21, 2019 07:30
Show Gist options
  • Save T1T4N/99625f01709b0dad0fc1087a3ab42335 to your computer and use it in GitHub Desktop.
Save T1T4N/99625f01709b0dad0fc1087a3ab42335 to your computer and use it in GitHub Desktop.
Tar with options (rename & exclude)
#!/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