#!/usr/bin/env bash set -euo pipefail cd "$(dirname "$0")" if [ ! -d .git ]; then echo ".git folder not found, nothing to do." >&2 exit 1 fi zip -rq GITFOLDER.zip .git rm -rf .git echo "Zipped .git into GITFOLDER.zip and removed .git folder."