Create deltagit.sh

This commit is contained in:
Daniel Løvbrøtte Olsen 2018-01-09 02:38:38 +01:00 committed by GitHub
parent a1d2d9d88f
commit f771f86e7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

11
bash/deltagit.sh Normal file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
folders=( $1/*/ )
repo="$2"
declare -p folders
for folder in ${folders[@]}; do
rm -r $repo/*;
cp -r $folder/* $repo
git --work-tree=$repo --git-dir=$repo/.git add .;
git --work-tree=$repo --git-dir=$repo/.git commit -m "$folder";
done;