#!/bin/sh -ex
-CURBACKUP=`ls -t /var/backups/pibackup/full* | head -n 1`
-[ -e "$CURBACKUP" ] || {
- echo no current full backup in /var/backups/pibackup
+if [ -n "`cd /etc; bzr modified`" ]; then
+ echo "uncommitted changes in /etc, aborting" >&2
exit 1
-}
-cp $CURBACKUP /home/
-
-apt-get autoclean
-mkdir -p /home/aptcache
-rm -rf /home/aptcache/*
-cp /var/cache/apt/archives/*.deb /home/aptcache/
+fi
+# push /etc/
+(cd /etc; HOME=/home/martin bzr push)