summaryrefslogtreecommitdiff
path: root/librechroot
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2012-02-06 09:46:21 -0600
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2012-02-06 09:53:01 -0600
commit5fe233209d9db31cc176edbcc76f9fe801c5eba0 (patch)
tree69f825406627005ace3c7884515f5ed2d3c9246d /librechroot
parentc5d7675fa4de40514deda2757cd027bb4870424e (diff)
librechroot: -r option creates empty repo
librerelease: exit with error if signing fails
Diffstat (limited to 'librechroot')
-rwxr-xr-xlibrechroot6
1 files changed, 5 insertions, 1 deletions
diff --git a/librechroot b/librechroot
index 31516ac..dfeabb0 100755
--- a/librechroot
+++ b/librechroot
@@ -83,8 +83,12 @@ EOF
function clean_repo {
msg "Cleaning repo for chroot: ${CHROOTDIR}/${CHROOTNAME}"
if [ -d "${CHROOTDIR}/${CHROOTNAME}/repo" ]; then
- rm -rf "${CHROOTDIR}/${CHROOTNAME}/repo"
+ find "${CHROOTDIR}/${CHROOTNAME}/repo/" -mindepth 1 -delete
+ else
+ mkdir -p "${CHROOTDIR}/${CHROOTNAME}/repo"
fi
+ bsdtar -czf "${CHROOTDIR}/${CHROOTNAME}/repo/repo.db.tar.gz" -T /dev/null
+ ln -s "repo.db.tar.gz" "${CHROOTDIR}/${CHROOTNAME}/repo/repo.db"
}
source /etc/libretools.conf