Skip to content

Instantly share code, notes, and snippets.

@alexmigf
Last active March 13, 2023 12:47
Show Gist options
  • Select an option

  • Save alexmigf/547c28e33d5d8e62e59c3a87c55a08d9 to your computer and use it in GitHub Desktop.

Select an option

Save alexmigf/547c28e33d5d8e62e59c3a87c55a08d9 to your computer and use it in GitHub Desktop.
################
#!/bin/bash
# Usage: zipsafe
BASENAME="${PWD##*/}"
rm -f $PWD/$BASENAME.zip
cd ../
zip -r $BASENAME.zip ./$BASENAME -x *.git* *.DS_Store *.gitignore *.gitkeep *.gitmodules *.distignore *composer.json
mv ./$BASENAME.zip /home/alex/Downloads/
cd $BASENAME
################
@alexmigf
Copy link
Author

alexmigf commented Jan 5, 2021

Install

$ touch zipsafe
$ chmod +x zipsafe
$ mv zipsafe /usr/bin/
$ export PATH=$PATH:/usr/bin/

Usage

$ cd /directory/plugin/
$ zipsafe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment