[PATCH 1/1] Guilt: Added an uninstall target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Invoking make uninstall will remove guilt files from installed directory.

Signed-off-by: Nur Hussein <hussein@xxxxxxxxx>
---
 Makefile  |    4 ++++
 uninstall |   18 ++++++++++++++++++
 2 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 828e73f..eb5fc2e 100644
--- a/Makefile
+++ b/Makefile
@@ -32,6 +32,10 @@ install:
 	install -d $(PREFIX)/bin/
 	install -m 755 $(SCRIPTS) $(PREFIX)/bin/
 
+.PHONY: uninstall
+uninstall:
+       ./uninstall $(PREFIX)/bin/ $(SCRIPTS)
+
 .PHONY: doc
 doc:
 	$(MAKE) -C Documentation all
diff --git a/uninstall b/uninstall
new file mode 100755
index 0000000..aa2e127
--- /dev/null
+++ b/uninstall
@@ -0,0 +1,18 @@
+#!/bin/bash
+#
+# Copyright (c) 2007 Nur Hussein <hussein@xxxxxxxxx>
+#
+
+if [ $# -lt 2 ]; then
+	echo "Usage: $0 <prefix> <file1> <file2> ..." >&2
+	exit 1
+fi
+
+PRE=$1
+
+shift
+
+for x in "$@"
+do
+	rm "$PRE/$x"
+done
-- 
1.4.4.4


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]