diff options
| author | Mitsuo Tokumori <[email protected]> | 2023-11-24 00:44:34 -0500 |
|---|---|---|
| committer | Mitsuo Tokumori <[email protected]> | 2023-11-24 00:44:34 -0500 |
| commit | dbf6639677796336bdb345efb70736d29c44f60f (patch) | |
| tree | e8427d394fe51939b43b28f9cb01c863451406df /local/bin/lp1-unzip_deletebinaries_zip.sh | |
| parent | 6e515b6902c537e742c2408783459e6a0ad10fa0 (diff) | |
| download | dotfiles-dbf6639677796336bdb345efb70736d29c44f60f.tar.gz dotfiles-dbf6639677796336bdb345efb70736d29c44f60f.tar.bz2 dotfiles-dbf6639677796336bdb345efb70736d29c44f60f.zip | |
Add my bash scripts
Diffstat (limited to 'local/bin/lp1-unzip_deletebinaries_zip.sh')
| -rwxr-xr-x | local/bin/lp1-unzip_deletebinaries_zip.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/local/bin/lp1-unzip_deletebinaries_zip.sh b/local/bin/lp1-unzip_deletebinaries_zip.sh new file mode 100755 index 0000000..9a51d24 --- /dev/null +++ b/local/bin/lp1-unzip_deletebinaries_zip.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Script for LP1 labs that are uploaded to Google Drive with binaries and +# that causes problems with Google Drive's automatic virus scan. + +# unzip +for f in *.zip; do unzip -q "$f"; done + +# delete build/ and dist/ directories (virus detection in Google Drive) +find . -type d -regex '^.*/\(dist\|build\)$' -print0 | xargs -0 rm -r + +# zip +rm *.zip # remove old zip files +for d in */; do + dirname="${d%/}" + zip -qr "$dirname.zip" "$d" +done |
