16 lines
462 B
Bash
Executable file
16 lines
462 B
Bash
Executable file
#!/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/
|