summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2012-02-08 10:34:04 -0600
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2012-02-08 10:34:04 -0600
commit8cb36c9e18a9a2d48c2151ccf30ac57df20ec38a (patch)
tree201c8dde2bb162e313bb3ea614605676365ac444
parent5fe233209d9db31cc176edbcc76f9fe801c5eba0 (diff)
librechroot: use update-cleansystem.
update-cleansystem: writes to /etc/libretools.d/cleansystem.
-rwxr-xr-xlibrechroot10
-rwxr-xr-xupdate-cleansystem2
2 files changed, 6 insertions, 6 deletions
diff --git a/librechroot b/librechroot
index dfeabb0..0398a0f 100755
--- a/librechroot
+++ b/librechroot
@@ -24,14 +24,15 @@
function usage {
+ echo ""
echo "Usage: $0 [options] [chrootname]"
echo "Use it as root."
- echo ''
+ echo ""
echo "Default chroot name: $CHROOT"
echo "Default chrootdir: $CHROOTDIR"
- echo ''
+ echo ""
echo "OPTIONS:"
- echo ''
+ echo ""
echo " -c : clean the chroot using pacman"
echo " only 'base', 'base-devel' and 'sudo' on chroot"
echo " -d <chrootdir> : use <chrootdir> instead of default"
@@ -43,9 +44,8 @@ function usage {
}
function clean_chroot { # Clean packages with pacman
-
msg "Cleaning chroot: ${CHROOTDIR}/${CHROOTNAME}"
-
+ update-cleansystem
cp "/etc/libretools.d/cleansystem" "${CHROOTDIR}/${CHROOTNAME}/cleansystem"
(cat <<EOF
#!/bin/bash
diff --git a/update-cleansystem b/update-cleansystem
index d4ad943..af215d7 100755
--- a/update-cleansystem
+++ b/update-cleansystem
@@ -19,6 +19,6 @@ pacman -r ${tmpdir} --config /etc/pacman.conf -Sy
pacman -r ${tmpdir} \
--config /etc/pacman.conf \
-Sp --print-format "%n" \
- base base-devel ${@} | sort > $(dirname $0)/cleansystem
+ base base-devel ${@} | sort > /etc/libretools.d/cleansystem
exit $?