summaryrefslogtreecommitdiff
path: root/examples/cron/snapshots.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:05:11 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:18:30 +0100
commit85c342c299231131d22764c0dfdcf977c57ce147 (patch)
tree1226c8a7ad43a2dd53e411c2e379969424e88e32 /examples/cron/snapshots.sh
parentd1ee66e44c8272bb7a0053a456a3d8b0bd152268 (diff)
downloadvyos-live-build-85c342c299231131d22764c0dfdcf977c57ce147.tar.gz
vyos-live-build-85c342c299231131d22764c0dfdcf977c57ce147.zip
Adding live-helper 1.0~a13-1.
Diffstat (limited to 'examples/cron/snapshots.sh')
-rwxr-xr-xexamples/cron/snapshots.sh26
1 files changed, 15 insertions, 11 deletions
diff --git a/examples/cron/snapshots.sh b/examples/cron/snapshots.sh
index 760b041fa..655d5124f 100755
--- a/examples/cron/snapshots.sh
+++ b/examples/cron/snapshots.sh
@@ -3,7 +3,7 @@
# Needs: build-essential fakeroot lsb-release svn [...]
# Static variables
-PACKAGES="live-helper live-initramfs live-webhelper"
+PACKAGES="live-helper live-initramfs live-sysvinit live-webhelper"
DEBEMAIL="debian-live-devel@lists.alioth.debian.org"
EMAIL="debian-live-devel@lists.alioth.debian.org"
@@ -80,19 +80,23 @@ do
rm -rf "${TEMPDIR}"/${PACKAGE}-${VERSION}~${REVISION}
# Creating directory
- if [ ! -d "${SERVER}" ]
- then
- mkdir -p "${SERVER}"
- fi
+ mkdir -p "${SERVER}"
# Removing old packages
- if ls "${SERVER}"/"${PACKAGE}"* &> /dev/null
- then
- rm -f "${SERVER}"/"${PACKAGE}"*
- fi
+ for FILE in `awk {'print $5'} "${SERVER}"/"${PACKAGE}"*.changes | grep -e ".*\.deb$" -e ".*\.diff.gz$" -e ".*\.dsc$" -e ".*\.tar.gz$" -e ".*\.udeb$"`
+ do
+ rm -f "${SERVER}"/"${FILE}"
+ done
- # Moving packages
- mv "${TEMPDIR}"/${PACKAGE}* "${SERVER}"
+ rm -f "${SERVER}"/"${PACKAGE}"*.changes
+
+ # Installing new packages
+ for FILE in `awk {'print $5'} "${TEMPDIR}"/"${PACKAGE}"*.changes | grep -e ".*\.deb$" -e ".*\.diff.gz$" -e ".*\.dsc$" -e ".*\.tar.gz$" -e ".*\.udeb$"`
+ do
+ mv "${TEMPDIR}"/"${FILE}" "${SERVER}"
+ done
+
+ mv "${TEMPDIR}"/"${PACKAGE}"*.changes "${SERVER}"
else
# Remove sources
rm -rf "${TEMPDIR}"/${PACKAGE}