Bash script to build LFS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
576 B

#!/usr/bin/env bash
stablesourcepath=${HOME}/lfs_archives_13_0
devuser=lfsdev
devhost=lfsdev64
devhostpath=/mnt/lfsdev/sources/
devsourcepath=${HOME}/lfs_archives_dev
find "${stablesourcepath}/" \( -name "*.patch" -or -name "*.tar.*" \) -print > /tmp/stablesourcelist
while IFS= read -r -d '' wgetitem
do
if ! grep --quiet "$(basename "${wgetitem}")" /tmp/stablesourcelist
then
scp ${devuser}@${devhost}:"${wgetitem}" "${devsourcepath}/"
fi
done < <(ssh ${devuser}@${devhost} "find ${devhostpath} \( -name "*.patch" -or -name "*.tar.*" \) -print0")