48b26a331f
This removes the recurring messages about adding key to host file (the hostfile is /dev/null)
29 lines
609 B
Bash
29 lines
609 B
Bash
|
|
get_get_repo(){
|
|
CACHDIR=$TOCI_CACHE_DIR/${1/\//_}
|
|
if [ ! -e $CACHDIR ] ; then
|
|
git clone https://github.com/$1.git $CACHDIR
|
|
else
|
|
cd $CACHDIR
|
|
git fetch
|
|
git reset --hard origin/master
|
|
fi
|
|
cp -r $CACHDIR $TOCI_WORKING_DIR/${1/\//_}
|
|
}
|
|
|
|
ssh_noprompt(){
|
|
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=QUIET $@
|
|
}
|
|
|
|
scp_noprompt(){
|
|
scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=QUIET $@
|
|
}
|
|
|
|
wait_for(){
|
|
for x in {0..60} ; do
|
|
$@ && return 0 || true
|
|
sleep 10
|
|
done
|
|
return 1
|
|
}
|