mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-19 11:42:43 +00:00
prepend git output with repo name
This commit is contained in:
parent
f04e4c2d7e
commit
31c9fa7888
3
cros.sh
3
cros.sh
@ -20,6 +20,7 @@ function git_clone_or_pull {
|
||||
URL=$1
|
||||
DIRECTORY=$2
|
||||
BARE=$3
|
||||
name=$(basename $2)
|
||||
if [[ -z $BARE ]]; then
|
||||
if [[ -d $DIRECTORY ]]; then
|
||||
git -C $DIRECTORY pull
|
||||
@ -28,7 +29,7 @@ function git_clone_or_pull {
|
||||
fi
|
||||
else
|
||||
if [[ -d $DIRECTORY ]]; then
|
||||
git -C $DIRECTORY fetch --force --prune
|
||||
git -C $DIRECTORY fetch --force --prune 2>&1 | sed "s/^/$name: /"
|
||||
else
|
||||
git clone --bare $URL $DIRECTORY
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user