Sujet : Re: Git automation
De : sgk (at) *nospam* REMOVEtroutmask.apl.washington.edu (Steven G. Kargl)
Groupes : comp.unix.bsd.freebsd.misc comp.os.linux.miscDate : 04. May 2025, 01:38:24
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vv6cu0$i6tm$1@dont-email.me>
References : 1
User-Agent : Pan/0.145 (Duplicitous mercenary valetism; d7e168a git.gnome.org/pan2)
On Sat, 03 May 2025 21:32:49 +0000, The Doctor wrote:
I have a directory /path/to/
where is Have programmes with .git is found .
How can i cron a script so that the git pull can be run in the
subdirectories with a .git subdirectory , ogin to the next one until done
and report results in e-mail ?
Use crontab to execute Try something like
% cat zxc
#! /bin/sh
cd ${HOME}
|
DIRS="$(find . -type d -name .git | sed s/\/.git//)"
for i in $DIRS ; do
cd $i
git pull -ff
cd ${HOME}
done
-- steve