git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
NHNur Hussein <hussein@cs.usm.my>
Date
Mar 6, 2007, 03:31 UTC
Message-ID
<1173151869.4877.15.camel@gandalf.dcc.usm.my>
Invoking make uninstall will remove guilt files from installed directory.
Signed-off-by: Nur Hussein <hussein@cs.usm.my>
---
 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@cs.usm.my>
+#
+
+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.
Next: Josef Sipek
Message 1 of 2 in “Guilt: Added an uninstall target”
  1. 1/1 Guilt: Added an uninstall targetNur Hussein, Mar 6, 2007
  2. Josef SipekMar 6, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.