Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fw32.git;a=commitdiff;h=ae8fcef46fb6cb672a6eb02f032c3606efc9a378

commit ae8fcef46fb6cb672a6eb02f032c3606efc9a378
Author: James Buren <r...@frugalware.org>
Date:   Mon Oct 24 04:11:40 2011 -0500

fw32
* add some more commands

diff --git a/fw32 b/fw32
index 8fffe4f..ff60bd5 100755
--- a/fw32
+++ b/fw32
@@ -49,6 +49,12 @@ pacman_g2()
[ $? -ne 0 ] && error "pacman-g2 failed to perform its action."
}

+run()
+{
+       /usr/bin/linux32 /usr/sbin/chroot $FW32_ROOT $@
+       [ $? -ne 0 ] && error "Failed to run command $@."
+}
+
mount_all()
{
for i in ${FW32_DIRS[@]}; do
@@ -74,4 +80,21 @@ create()
umount /var/cache/pacman-g2/pkg
}

+update()
+{
+       umount_all
+       mount /var/cache/pacman-g2/pkg
+       pacman_g2 -Syuf
+       umount /var/cache/pacman-g2/pkg
+       mount_all
+       run fc-cache --force --system-only
+}
+
+delete()
+{
+       umount_all
+       rm -rf $FW32_ROOT
+       [ $? -ne 0 ] && error "Failed to delete $FW32_ROOT."
+}
+
[ $UID -ne 0 ] && [ $EUID -ne 0 ] && error "You must run this command as root."
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to