Page MenuHomec4science

pull-daemons.sh
No OneTemporary

File Metadata

Created
Tue, May 7, 17:36

pull-daemons.sh

#!/bin/bash
BIN={{ phabricator_path }}phabricator/bin
NB={{ phd_pull_number }}
# Get repo and split in equal amount
$BIN/repository list > /tmp/repo
lines=$(wc -l /tmp/repo | awk '{print $1}')
split -d -l $(($lines / $NB)) /tmp/repo /tmp/repo_
# Launch single daemon for new repo excluding current repo
NOT=$(cat /tmp/repo | tr '\n' ' ' | sed 's/ / --not /g')
$BIN/phd launch 1 pull -- --not $(echo ${NOT::-7})
# Launch specialized daemons
for i in $(ls /tmp/repo_*); do
$BIN/phd launch 1 pull -- $(cat $i | tr '\n' ' ')
done
rm -f /tmp/repo*

Event Timeline