git.iko.soy/typeable/pandoc
on master help sign in
Added uninstall-pandoc script for Mac OS X package.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@61 788f1e2b-df1e-0410-8736-df70ead52e1b

commit7ccf149504d32b99f6dc198f2ce998861714bcf2 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateWed 1 Nov 2006, 08:20 (20 years ago) parent1f18bc8
1 file changed+47
osx/uninstall-pandoc+47
osx/uninstall-pandocnew file+47
@@ -0,0 +1,47 @@
1+#!/bin/sh -e
2+# This script (when run with root permissions) uninstalls
3+# everything installed by the Pandoc Mac OS X installer.
4+
5+[ -f /usr/local/bin/pandoc ] || {
6+ echo "Pandoc does not appear to be installed."; \
7+ exit 0;
8+}
9+
10+if [ "`id -u`" != 0 ]; then \
11+ echo "This script must be run with sudo."; \
12+ exit 0; \
13+fi
14+
15+
16+MAN_PAGES="pandoc.1 markdown2html.1 markdown2latex.1 html2markdown.1 latex2markdown.1 markdown2pdf.1"
17+EXECUTABLES=`echo $MAN_PAGES | sed -e 's#\.1##g'`
18+DOCUMENTS="`ls /usr/local/share/doc/pandoc`"
19+TOREMOVE=""
20+for F in $EXECUTABLES; do
21+ TOREMOVE="$TOREMOVE /usr/local/bin/$F";
22+done
23+for F in $MAN_PAGES; do
24+ TOREMOVE="$TOREMOVE /usr/local/share/man/man1/$F";
25+done
26+for F in $DOCUMENTS; do
27+ TOREMOVE="$TOREMOVE /usr/local/share/doc/pandoc/$F";
28+done
29+TOREMOVE="$TOREMOVE /usr/local/share/doc/pandoc"
30+
31+echo "This script will remove all of the files installed"
32+echo "by the Pandoc Mac OS X installer: $TOREMOVE"
33+echo "Are you sure you want to continue with this?"
34+
35+OPTIONS="Continue Quit"
36+select opt in $OPTIONS; do
37+ if [ "$opt" = "Quit" ]; then
38+ exit 0
39+ elif [ "$opt" = "Continue" ]; then
40+ echo "Removing..."
41+ rm -rv $TOREMOVE
42+ echo "Successfully removed Pandoc."
43+ exit 0
44+ else
45+ echo "Bad option."
46+ fi
47+done