Created
April 15, 2022 03:56
-
-
Save carlohcs/f75bb12d1f568032e6c30ee47470e77e to your computer and use it in GitHub Desktop.
Compress files to separate folders and exclude folders
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
#!/bin/bash | |
currentFolder=$(pwd) | |
echo "#################################" | |
echo "# Compressing folders from ${currentFolder}" | |
echo "#################################" | |
for i in */; do tar -czvf "${i%/}.tar.gz" --exclude "node_modules" --exclude ".next" "$i"; done | |
echo "Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment