Files
project-work/worker-toolkit-flaredown/repo/zip-git.sh

15 lines
251 B
Bash
Executable File

#!/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."