distribution/tools/sync
2022-02-05 09:23:32 -05:00

16 lines
658 B
Bash
Executable file

#!/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