diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2006-11-01 08:20:17 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2006-11-01 08:20:17 +0000 |
commit | 7ccf149504d32b99f6dc198f2ce998861714bcf2 (patch) | |
tree | 718ef48e6f687491d6afad7a715d0c0515dbaaca /osx/uninstall-pandoc | |
parent | 1f18bc8266b39fe61380603e319d69a846630e37 (diff) | |
download | pandoc-7ccf149504d32b99f6dc198f2ce998861714bcf2.tar.gz |
Added uninstall-pandoc script for Mac OS X package.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@61 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'osx/uninstall-pandoc')
-rwxr-xr-x | osx/uninstall-pandoc | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/osx/uninstall-pandoc b/osx/uninstall-pandoc new file mode 100755 index 000000000..0ccf7990e --- /dev/null +++ b/osx/uninstall-pandoc @@ -0,0 +1,47 @@ +#!/bin/sh -e +# This script (when run with root permissions) uninstalls +# everything installed by the Pandoc Mac OS X installer. + +[ -f /usr/local/bin/pandoc ] || { + echo "Pandoc does not appear to be installed."; \ + exit 0; +} + +if [ "`id -u`" != 0 ]; then \ + echo "This script must be run with sudo."; \ + exit 0; \ +fi + + +MAN_PAGES="pandoc.1 markdown2html.1 markdown2latex.1 html2markdown.1 latex2markdown.1 markdown2pdf.1" +EXECUTABLES=`echo $MAN_PAGES | sed -e 's#\.1##g'` +DOCUMENTS="`ls /usr/local/share/doc/pandoc`" +TOREMOVE="" +for F in $EXECUTABLES; do + TOREMOVE="$TOREMOVE /usr/local/bin/$F"; +done +for F in $MAN_PAGES; do + TOREMOVE="$TOREMOVE /usr/local/share/man/man1/$F"; +done +for F in $DOCUMENTS; do + TOREMOVE="$TOREMOVE /usr/local/share/doc/pandoc/$F"; +done +TOREMOVE="$TOREMOVE /usr/local/share/doc/pandoc" + +echo "This script will remove all of the files installed" +echo "by the Pandoc Mac OS X installer: $TOREMOVE" +echo "Are you sure you want to continue with this?" + +OPTIONS="Continue Quit" +select opt in $OPTIONS; do + if [ "$opt" = "Quit" ]; then + exit 0 + elif [ "$opt" = "Continue" ]; then + echo "Removing..." + rm -rv $TOREMOVE + echo "Successfully removed Pandoc." + exit 0 + else + echo "Bad option." + fi +done |