Skip to content

Instantly share code, notes, and snippets.

@ychaouche
Created March 20, 2024 15:25
Show Gist options
  • Save ychaouche/42fe72f0fa20000659d66875ecf33163 to your computer and use it in GitHub Desktop.
Save ychaouche/42fe72f0fa20000659d66875ecf33163 to your computer and use it in GitHub Desktop.
archive.create.tgz is a function
archive.create.tgz ()
{
local dir="$1";
local archivename="$dir.tgz";
shift;
echo tar --exclude=*~ $@ -cvzf $archivename $dir;
tar --exclude=*~ $@ -cvzf $archivename $dir
}
archive.create.zip is a function
archive.create.zip ()
{
local dir="$1";
local archivename="$dir.zip";
shift;
zip "$archivename" -r "$dir"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment