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

commit 84ac18b7a93417fc35bcdd1433d7bfcc2e30a1dc
Author: James Buren <r...@frugalware.org>
Date:   Wed Nov 9 06:54:27 2011 -0600

add new install package function for local FPM installation.
good for no build packages.

diff --git a/Makefile b/Makefile
index bfba3ec..2b7ea53 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,6 @@
CFLAGS ?= -O2
CFLAGS += -D_GNU_SOURCE -DNDEBUG

-DESTDIR ?= /
-
all: fw32

install: all
@@ -25,3 +23,4 @@ install: all
ln -sf fw32 $(DESTDIR)/usr/bin/fw32-mount-all
ln -sf fw32 $(DESTDIR)/usr/bin/fw32-umount-all
ln -sf fw32 $(DESTDIR)/usr/bin/fw32-update
+       ln -sf fw32 $(DESTDIR)/usr/bin/fw32-install-package
diff --git a/fw32.c b/fw32.c
index db4d47f..5e7312f 100644
--- a/fw32.c
+++ b/fw32.c
@@ -488,6 +488,18 @@ fw32_install(char **args1)
}

static void
+fw32_install_package(char **args1)
+{
+  char *args2[] =
+  {
+    "-Uf",
+    0
+  };
+
+  pacman_g2(args_merge(0,args2,args1));
+}
+
+static void
fw32_remove(char **args1)
{
char *args2[] =
@@ -546,6 +558,8 @@ main(int argc,char **argv)
fw32_upgrade();
else if(!strcmp(cmd,"fw32-install"))
fw32_install(args);
+  else if(!strcmp(cmd,"fw32-install-package"))
+    fw32_install_package(args);
else if(!strcmp(cmd,"fw32-remove"))
fw32_remove(args);
else if(!strcmp(cmd,"fw32-clean"))
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to