]> git.wh0rd.org Git - home.git/commitdiff
auto prune older images
authorMike Frysinger <vapier@gentoo.org>
Thu, 6 Sep 2012 17:04:09 +0000 (13:04 -0400)
committerMike Frysinger <vapier@gentoo.org>
Thu, 6 Sep 2012 17:04:09 +0000 (13:04 -0400)
.bin/cros-board

index 5ccfb1442f358f754aa335bf905096948deafb1c..30603da89010153b1be3efa89d75eafc0ce4c668 100755 (executable)
@@ -86,6 +86,9 @@ if ${ARG_DEV_USER} ; then
        sync &
 fi
 
+cd "${IMAGES}"
+rm -rf $(ls -td1R `find -mindepth 1 -maxdepth 1 -type d` | sed -e 1d -e 2d)
+
 cat <<EOF
 
 ### LIVE