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

19 lines
329 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
if [ ! -f GITFOLDER.zip ]; then
echo "GITFOLDER.zip not found, nothing to do." >&2
exit 1
fi
if [ -d .git ]; then
echo ".git folder already exists, refusing to overwrite." >&2
exit 1
fi
unzip -q GITFOLDER.zip
echo "Unzipped GITFOLDER.zip into .git folder."