Skip to content

Commit

Permalink
narcissus: try cleaning up stale files at the start of every build
Browse files Browse the repository at this point in the history
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
  • Loading branch information
koenkooi committed Dec 4, 2010
1 parent 9761524 commit 36f2fa4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/assemble-image.sh
Expand Up @@ -55,7 +55,7 @@ if [ -e ${WORKDIR}/conf/${MACHINE}/sd ] ; then
BYTES_PER_SECTOR="$(/sbin/fdisk -l -u sd.img | grep Units | awk '{print $9}')"
VFAT_SECTOR_OFFSET="$(/sbin/fdisk -l -u sd.img | grep img1 | awk '{print $3}')"

LOOP_DEV="/dev/loop0"
LOOP_DEV="/dev/loop1"
echo "/sbin/losetup -v -o $(expr ${BYTES_PER_SECTOR} "*" ${VFAT_SECTOR_OFFSET}) ${LOOP_DEV} sd.img"
/sbin/losetup -v -o $(expr ${BYTES_PER_SECTOR} "*" ${VFAT_SECTOR_OFFSET}) ${LOOP_DEV} sd.img

Expand Down
5 changes: 3 additions & 2 deletions scripts/configure-image.sh
Expand Up @@ -4,8 +4,9 @@
# Koen Kooi (c) 2008, 2009 - all rights reserved

echo "cleaning up stale files"
find /tmp -name "opkg*" -mtime +2 -exec rm -r {} \;
#find deploy -depth -mindepth 2 -mtime +4 -delete
find /tmp -name 'opkg*' -mtime +2 -exec rm -rv {} \;
find deploy -depth -mindepth 2 -maxdepth 2 -mtime +3 -exec rm -rv {} \;
find work -depth -mindepth 1 -maxdepth 2 -mtime +1 -exec rm -rfv {} \;

MACHINE=$1
IMAGENAME=$2
Expand Down

0 comments on commit 36f2fa4

Please sign in to comment.