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

commit df75311a21acd304a199caf9e9166c6da9753535
Author: James Buren <r...@frugalware.org>
Date:   Sun Oct 23 17:27:45 2011 -0500

fw32
* add some more commands

diff --git a/fw32 b/fw32
old mode 100644
new mode 100755
index 1446e8a..8fffe4f
--- a/fw32
+++ b/fw32
@@ -39,7 +39,7 @@ umount()

mkdir()
{
-       /usr/bin/mkdir -p "$1"
+       /usr/bin/mkdir -p "$FW32_ROOT/$1"
[ $? -ne 0 ] && "Failed to create directory $1."
}

@@ -49,6 +49,13 @@ pacman_g2()
[ $? -ne 0 ] && error "pacman-g2 failed to perform its action."
}

+mount_all()
+{
+       for i in ${FW32_DIRS[@]}; do
+               mount $i
+       done
+}
+
umount_all()
{
for i in $(/usr/bin/grep -o -E "$FW32_ROOT/[a-zA-Z0-9_/]+" /proc/mounts); do
@@ -56,4 +63,15 @@ umount_all()
done
}

+create()
+{
+       [ -d "$FW32_ROOT" ] && error "$FW32_ROOT appears to already exist."
+       for i in ${FW32_DIRS[@]}; do
+               mkdir $i
+       done
+       mount /var/cache/pacman-g2/pkg
+       pacman_g2 -Sy shadow coreutils findutils which wget file tar gzip bzip2 
util-linux procps kbd psmisc less
+       umount /var/cache/pacman-g2/pkg
+}
+
[ $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