On Tue, Feb 16, 2021, at 7:33 PM, James wrote:
> I have a bunch of git repos under /hdd-storage/storage/programming/ that
> I want to keep up to date.
>
> I tried:
>
> $ find /hdd-storage/storage/programming/ -maxdepth 1 -type d -exec "cd
> {}; git pull" \;
>
> but I get:
> find: ‘cd /hdd-storage/storage/programming/’: No such file or directory
> find: ‘cd /hdd-storage/storage/programming/gramps’: No such file or
> directory
This will need some work, untested.
#!/bin/sh
FILES=$(ls /hdd-storage/storage/programming/)
for file in $FILES
do
if [ -d file ] ; then
cd $file
git pull
fi
done
--
Dan Langille
dan [ at ] langille [ dot ] org
To unsubscribe send a blank message to linux+unsubscribe [ at ] linux-ottawa [ dot ] org
To get help send a blank message to linux+help [ at ] linux-ottawa [ dot ] org
To visit the archives: https://lists.linux-ottawa.org