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.

Revisions

  1. alexmigf revised this gist Mar 13, 2023. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions zipsafe
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    BASENAME="${PWD##*/}"
    rm -f $PWD/$BASENAME.zip
    cd ../
    zip -r $BASENAME.zip ./$BASENAME -x *.git* *.DS_Store *.gitignore *.gitkeep *.gitmodules *composer.json
    mv ./$BASENAME.zip /home/alexandre/Transferências/
    zip -r $BASENAME.zip ./$BASENAME -x *.git* *.DS_Store *.gitignore *.gitkeep *.gitmodules *.distignore *composer.json
    mv ./$BASENAME.zip /home/alex/Downloads/
    cd $BASENAME
    ################
  2. alexmigf revised this gist Jan 7, 2021. 1 changed file with 4 additions and 5 deletions.
    9 changes: 4 additions & 5 deletions zipsafe
    Original file line number Diff line number Diff line change
    @@ -3,9 +3,8 @@
    # Usage: zipsafe
    BASENAME="${PWD##*/}"
    rm -f $PWD/$BASENAME.zip
    mkdir ./$BASENAME
    rsync -r --exclude={$BASENAME,'*.git*','*.DS_Store','*.gitignore','*.gitkeep','*.gitmodules','composer.json'} ./* ./$BASENAME/
    zip -r $BASENAME.zip ./$BASENAME
    mv $PWD/$BASENAME.zip /home/alexandre/Transferências/
    rm -rf ./$BASENAME
    cd ../
    zip -r $BASENAME.zip ./$BASENAME -x *.git* *.DS_Store *.gitignore *.gitkeep *.gitmodules *composer.json
    mv ./$BASENAME.zip /home/alexandre/Transferências/
    cd $BASENAME
    ################
  3. alexmigf revised this gist Jan 6, 2021. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion zipsafe
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,11 @@
    ################
    #!/bin/bash
    # Usage: zipsafe
    BASENAME="${PWD##*/}"
    rm -f $PWD/$BASENAME.zip
    zip -r $BASENAME.zip ./ -x *.git* -x *.DS_Store -x *.gitignore *.gitkeep *.gitmodules composer.json
    mkdir ./$BASENAME
    rsync -r --exclude={$BASENAME,'*.git*','*.DS_Store','*.gitignore','*.gitkeep','*.gitmodules','composer.json'} ./* ./$BASENAME/
    zip -r $BASENAME.zip ./$BASENAME
    mv $PWD/$BASENAME.zip /home/alexandre/Transferências/
    rm -rf ./$BASENAME
    ################
  4. alexmigf revised this gist Jan 5, 2021. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion zipsafe
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,5 @@
    ################
    #!/bin/bash
    # Usage: zipsafe
    BASENAME="${PWD##*/}"
    rm -f $PWD/$BASENAME.zip
    zip -r $BASENAME.zip ./ -x *.git* -x *.DS_Store -x *.gitignore *.gitkeep *.gitmodules composer.json
  5. alexmigf revised this gist Jan 5, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions zipsafe
    Original file line number Diff line number Diff line change
    @@ -4,4 +4,5 @@
    BASENAME="${PWD##*/}"
    rm -f $PWD/$BASENAME.zip
    zip -r $BASENAME.zip ./ -x *.git* -x *.DS_Store -x *.gitignore *.gitkeep *.gitmodules composer.json
    mv $PWD/$BASENAME.zip /home/alexandre/Transferências/
    ################
  6. alexmigf revised this gist Jan 5, 2021. 1 changed file with 5 additions and 9 deletions.
    14 changes: 5 additions & 9 deletions zipsafe
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,7 @@
    ################
    #!/bin/bash
    # Usage: zipsafe FOLDER
    if [[ $# -eq 0 ]] ; then
        echo 'no arguments given!'
        exit 0
    fi

    rm -f [email protected]
    zip -r ${@%/}.zip ${@%/}/ -x *.git* -x *.DS_Store -x *.gitignore *.gitkeep
    #!/bin/bash
    # Usage: zipsafe
    BASENAME="${PWD##*/}"
    rm -f $PWD/$BASENAME.zip
    zip -r $BASENAME.zip ./ -x *.git* -x *.DS_Store -x *.gitignore *.gitkeep *.gitmodules composer.json
    ################
  7. alexmigf created this gist Jan 5, 2021.
    11 changes: 11 additions & 0 deletions zipsafe
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    ################
    #!/bin/bash
    # Usage: zipsafe FOLDER
    if [[ $# -eq 0 ]] ; then
        echo 'no arguments given!'
        exit 0
    fi

    rm -f [email protected]
    zip -r ${@%/}.zip ${@%/}/ -x *.git* -x *.DS_Store -x *.gitignore *.gitkeep
    ################