Last active
April 4, 2020 08:30
-
-
Save rumkin/4517f370e7021e1df7c071b2eb22c36a to your computer and use it in GitHub Desktop.
Pack node project into tar with find
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
find-to-tar() { | |
local IN=${1:-.} | |
local OUT=${2:-archive.tar.gz} | |
find $IN -type f ! \( -path '*/node_modules/*' -o -path '*/dist/*' -o -path '*/build/*' \) | tar cvfz $OUT -T - | |
} | |
# Example: | |
# $ find-to-tar . arch.tar.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment