Commit e7d12703 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

untar on target

parent 5e5ff77a
......@@ -4,11 +4,13 @@ IDENTITY_FILE ??= "~/.ssh/id_rsa"
do_target_scp () {
#Without next echo - no trace of the scp in the log!
SSH_COMMAND='tar -C / -xzpf /image.tar.gz; rm -f /image.tar.gz; sync'
tar -czvf ${WORKDIR}/image.tar.gz -C ${WORKDIR}/image .
echo scp -i ${IDENTITY_FILE} -p ${WORKDIR}/image.tar.gz ${REMOTE_USER}@${REMOTE_IP}:/
scp -i ${IDENTITY_FILE} -p ${WORKDIR}/image.tar.gz ${REMOTE_USER}@${REMOTE_IP}:/
echo ssh -i ${IDENTITY_FILE} ${REMOTE_USER}@${REMOTE_IP} ${SSH_COMMAND}
ssh -i ${IDENTITY_FILE} ${REMOTE_USER}@${REMOTE_IP} ${SSH_COMMAND}
}
addtask do_target_scp after do_install
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment