Copy packages by generating the package list from make instead of comparing a timestamp

This commit is contained in:
builder 2019-08-13 08:22:59 -06:00
parent 8bb5fa0958
commit 82261c8bda
1 changed files with 12 additions and 0 deletions

12
05_copy_packages.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
set -e
ARCH=$(sysctl -n hw.machine)
LISTE=$(mktemp /tmp/filelist.XXXXXXXXXXXXXXXXXX)
make -C /home/ports SUBDIRLIST=~/fulllist show=PKGNAMES | grep -v "^=" | tr ' ' '\n' | sed 's,$,\.tgz,' | sort | uniq > "${LISTE}"
doas mkdir -p /mnt/packages-stable/$ARCH/ftp/
doas rsync --files-from="${LISTE}" -av /home/packages/$ARCH/ftp/ /mnt/packages-stable/$ARCH/ftp/
rm "${LISTE}"