マイホームコンピュータでは、このスクリプトを使用してgitpull.sh
すべての変更を特定のディレクトリのgitリポジトリに同時にインポートします。
#!/usr/bin/bash
find $1 -name ".git" | sed -r 's|/[^/]+$||' | parallel git -C {} pull origin master
私の問題は、parallel
仕事用コンピュータにソフトウェアがインストールされていないことです。スクリプトを使用せずにスクリプトを変更できますかparallel
?
ベストアンサー1
並列化する代わりに、-P フラグで xargs を使用できます。それは次のとおりです。
find $1 -name ".git" | sed -r 's|/[^/]+$||' | xargs -I {} -n 1 -P 0 git -C {} pull origin master