Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F61055049
pull-daemons.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, May 4, 06:12
Size
625 B
Mime Type
text/x-shellscript
Expires
Mon, May 6, 06:12 (2 d)
Engine
blob
Format
Raw Data
Handle
17458694
Attached To
rPHINFRA c4science
pull-daemons.sh
View Options
#!/bin/bash
BIN
={{
phabricator_path
}}
phabricator/bin
NB
={{
phd_pull_number
}}
DIR
=
$(
mktemp -d
)
FILE
=
'list_repo'
# Get repo and split in equal amount
$BIN
/repository list >
$DIR
/
$FILE
lines
=
$(
wc -l
$DIR
/
$FILE
| awk
'{print $1}'
)
split -d -l
$((
(
$lines
+
$NB
-
1
/
$NB
)
/
$NB
))
$DIR
/
$FILE
$DIR
/
${
FILE
}
_
# Launch single daemon for new repo excluding current repo
NOT
=
$(
cat
$DIR
/
$FILE
| tr
'\n'
' '
| sed
's/ / --not /g'
)
$BIN
/phd launch 1 pull -- --not
$(
echo
${
NOT
:
:-
7
})
# Launch specialized daemons
for
i in
$(
ls
$DIR
/
$FILE
*
)
;
do
$BIN
/phd launch 1 pull --
$(
cat
$i
| tr
'\n'
' '
)
done
# Cleanup
rm -f
$DIR
/
$FILE
*
Event Timeline
Log In to Comment