Modification pour lancer le script et éviter le spam de wall vides
This commit is contained in:
parent
03ea6eafc8
commit
9c881c366e
2 changed files with 7 additions and 3 deletions
|
@ -47,7 +47,7 @@ for GIT_REPO in $work_array ; do
|
|||
remoteStatus="$(git fetch --dry-run 2>&1 | tail -n 1 | grep -v -e'+')" # Empty if there are no commits to fetch
|
||||
localStatus="$(git push -n --porcelain | grep -e'up to date')" # Empty if there are commits to push
|
||||
|
||||
{
|
||||
output=$(
|
||||
if [ -z "$remoteStatus" ]; then
|
||||
if [ -z "$localStatus" ]; then
|
||||
echo "Pushing "$GIT_REPO" updates to origin"
|
||||
|
@ -64,7 +64,11 @@ for GIT_REPO in $work_array ; do
|
|||
git remote update 2>&1
|
||||
exit 1
|
||||
fi
|
||||
fi } | wall
|
||||
fi )
|
||||
|
||||
if [ ! -z "$output" ]; then
|
||||
echo "$output" | wall
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
|
|
@ -4,4 +4,4 @@ Description=Updates git repos
|
|||
[Service]
|
||||
Type=oneshot
|
||||
User=intech
|
||||
ExecStart=/bin/bash ~/git_repos/gitUpdate.sh "/home/intech/git_repos/TechTheTachyon-HighLevel.git" "/home/intech/git_repos/TechTheTachyon-LowLevel.git"
|
||||
ExecStart=/bin/bash /home/intech/git_repos/gitUpdate.sh "/home/intech/git_repos/TechTheTachyon-HighLevel.git" "/home/intech/git_repos/TechTheTachyon-LowLevel.git"
|
Loading…
Add table
Reference in a new issue