distribution/tools/sync

17 lines
658 B
Text
Raw Normal View History

2022-02-05 14:23:32 +00:00
#!/bin/bash
HOST="www.jelos.org"
USER="root"
WWWPATH="/var/www/html/releases"
if [ ! -z "${ARCH}" ] || [ ! -z "${DEVICE}" ] || [ ! -z "${DISTRO}" ]
then
export DISTRO=JELOS
export ARCH=aarch64
export DEVICE=RG552
fi
ssh ${USER}@${HOST} mkdir -p ${WWWPATH}/${DEVICE}/{distribution,sources}
ssh ${USER}@${HOST} rm -f ${WWWPATH}/${DEVICE}/distribution/*
rsync -av --delete --progress --stats release/${ARCH}/${DEVICE}/{*img*,*tar*} ${USER}@${HOST}:${WWWPATH}/${DEVICE}/distribution/
rsync -av --delete --progress --stats --exclude="j/jelos-*" --include="*.tar.gz" build.${DISTRO}-${DEVICE}.${ARCH}-sources/* ${USER}@${HOST}:${WWWPATH}/${DEVICE}/sources