#!/bin/bash DATE=$(date +%Y%m%d) mkdir ~/c2d/build_results_${DATE} # update the packages we can build cran2deb update > ~/c2d/build_results_${DATE}/log.txt 2>&1 # build tehm cran2deb autobuild >> ~/c2d/build_results_${DATE}/log.txt 2>&1 # move them to a folder so we can sign and upload them find ~/c2d/cache/results/debian-amd64 -type f -print0 | \ xargs -0r mv -t ~/c2d/build_results_${DATE}/ # backup database cp ~/c2d/cache/cran2deb.db ~/c2d/cache/cran2deb_${DATE}.db