Fixed deinstall script after recent install changes.

This commit is contained in:
Dominik Picheta 2016-06-06 01:16:25 +01:00
commit 6c88debd5c
2 changed files with 23 additions and 6 deletions

View file

@ -12,7 +12,7 @@ if [ $# -eq 1 ] ; then
echo " /usr/bin"
echo " /usr/local/bin"
echo " /opt"
echo " <some other dir> (treated like '/opt')"
echo " <some other dir> (treated similar '/opt')"
exit 1
;;
"/usr/bin")
@ -21,6 +21,7 @@ if [ $# -eq 1 ] ; then
libdir=/usr/lib/?proj
docdir=/usr/share/?proj/doc
datadir=/usr/share/?proj/data
nimbleDir="/opt/nimble/pkgs/?c.nimblePkgName-?c.version/"
;;
"/usr/local/bin")
bindir=/usr/local/bin
@ -28,6 +29,15 @@ if [ $# -eq 1 ] ; then
libdir=/usr/local/lib/?proj
docdir=/usr/local/share/?proj/doc
datadir=/usr/local/share/?proj/data
nimbleDir="/opt/nimble/pkgs/?c.nimblePkgName-?c.version/"
;;
"/opt")
bindir="/opt/?proj/bin"
configdir="/opt/?proj/config"
libdir="/opt/?proj/lib"
docdir="/opt/?proj/doc"
datadir="/opt/?proj/data"
nimbleDir="/opt/nimble/pkgs/?c.nimblePkgName-?c.version/"
;;
*)
bindir="$1/?proj/bin"
@ -35,6 +45,7 @@ if [ $# -eq 1 ] ; then
libdir="$1/?proj/lib"
docdir="$1/?proj/doc"
datadir="$1/?proj/data"
nimbleDir="$1/?proj"
;;
esac
echo "removing files..."
@ -51,6 +62,12 @@ if [ $# -eq 1 ] ; then
rm -rf $datadir
rm -rf $libdir
## Nimble pkg stuff
#for f in items(c.cat[fcNimble]):
rm -f $nimbleDir/?f.toUnix
#end for
rm -f $nimbleDir/?{c.nimblePkgName}.nimble
echo "deinstallation successful"
else
echo "?c.displayName deinstallation script"
@ -59,6 +76,6 @@ else
echo " /usr/bin"
echo " /usr/local/bin"
echo " /opt"
echo " <some other dir> (treated like '/opt')"
echo " <some other dir> (treated similar '/opt')"
exit 1
fi

View file

@ -23,7 +23,7 @@ if [ $# -eq 1 ] ; then
echo " /usr/bin"
echo " /usr/local/bin"
echo " /opt"
echo " <some other dir> (treated like '/opt')"
echo " <some other dir> (treated similar to '/opt')"
echo "To deinstall, use the command:"
echo "sh deinstall.sh DIR"
exit 1
@ -127,7 +127,7 @@ else
echo " /usr/bin"
echo " /usr/local/bin"
echo " /opt"
echo " <some other dir> (treated like '/opt')"
echo " <some other dir> (treated similar to '/opt')"
echo "To deinstall, use the command:"
echo "sh deinstall.sh DIR"
exit 1