feat(scripts): add code to csv script
This commit is contained in:
parent
f110fbfaf8
commit
17ed4c7a94
1 changed files with 16 additions and 0 deletions
16
scripts/code-repo-to-csv.sh
Executable file
16
scripts/code-repo-to-csv.sh
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
now="$(date +'%d/%m/%Y %T')"
|
||||||
|
cd ~/Code/
|
||||||
|
echo "datetime_create,datetime_latest,\"Dossier *\",\"Dépot git *\",\"Branche par défaut\",Description" > code.csv
|
||||||
|
for i in */.git; do (
|
||||||
|
cd $i/..;
|
||||||
|
dir=${i/\/.git/}
|
||||||
|
branch="$(git branch --show-current)"
|
||||||
|
cd ~/Code/$i
|
||||||
|
repo="$(cat config | grep "url ="| tr -d '[:space:]')"
|
||||||
|
repo="${repo/url=/}"
|
||||||
|
cd ~/Code/
|
||||||
|
echo "\"$now\",\"$now\",$dir,$repo,$branch,$dir") >> code.csv;
|
||||||
|
done
|
||||||
|
cd ~/Code/
|
Loading…
Add table
Reference in a new issue