bug 509264 - Sisyphus - fix uninstaller, r=ctalbert.

This commit is contained in:
Bob Clary 2009-08-18 00:29:59 -07:00
Родитель c4c1cac6d1
Коммит 64724b1ef9
1 изменённых файлов: 9 добавлений и 12 удалений

Просмотреть файл

@ -88,7 +88,8 @@ if [[ -z "$product" || -z "$branch" || -z "$executablepath" ]]
fi
if [[ ! ls "$executablepath/*" 2> /dev/null ]]; then
if ! ls $executablepath/* > /dev/null 2>&1; then
echo "uninstall-build.sh: ignoring missing $executablepath"
exit 0
fi
@ -100,7 +101,7 @@ if [[ $OSID == "nt" ]]; then
# see http://nsis.sourceforge.net/Docs/Chapter3.html
# if the directory already exists, attempt to uninstall
# any existing installation.
# any existing installation. Suppress failures.
if [[ -d "$executabledir/uninstall" ]]; then
@ -108,26 +109,22 @@ if [[ $OSID == "nt" ]]; then
uninstallexe="$executabledir/uninstall/uninstall.exe"
uninstallini="$executabledir/uninstall/uninstall.ini"
if [[ -n "$uninstallexe" && -e "$uninstallexe" ]]; then
if sed -i.bak 's/Run Mode=Normal/Run Mode=Silent/' $uninstallini;
if sed -i.bak 's/Run Mode=Normal/Run Mode=Silent/' $uninstallini;
then
# uninstall.exe will return non zero exit codes
# for no damn reason.
if $uninstallexe; then
true
fi
if $uninstallexe; then true; fi
fi
fi
elif [[ "$branch" == "1.8.1" || "$branch" == "1.9.0" || "$branch" == "1.9.1" ]]; then
elif [[ "$branch" == "1.8.1" || "$branch" == "1.9.0" || "$branch" == "1.9.1" || "$branch" == "1.9.2" ]]; then
uninstalloldexe="$executabledir/uninstall/uninst.exe"
uninstallnewexe="$executabledir/uninstall/helper.exe"
if [[ -n "$uninstallnewexe" && -e "$uninstallnewexe" ]]; then
$uninstallnewexe /S /D=`cygpath -a -w $executabledir | sed 's@\\\\@\\\\\\\\@g'`
if $uninstallnewexe /S /D=`cygpath -a -w $executabledir | sed 's@\\\\@\\\\\\\\@g'`; then true; fi
elif [[ -n "$uninstalloldexe" && -e "$uninstalloldexe" ]]; then
$uninstalloldexe /S /D=`cygpath -a -w $executabledir | sed 's@\\\\@\\\\\\\\@g'`
if $uninstalloldexe /S /D=`cygpath -a -w $executabledir | sed 's@\\\\@\\\\\\\\@g'`; then true; fi
else
uninstallexe="$executabledir/$product/uninstall/uninstaller.exe"
if [[ -n "$uninstallexe" && -e "$uninstallexe" ]]; then
$uninstallexe /S /D=`cygpath -a -w "$executabledir" | sed 's@\\\\@\\\\\\\\@g'`
if $uninstallexe /S /D=`cygpath -a -w "$executabledir" | sed 's@\\\\@\\\\\\\\@g'`; then true; fi
fi
fi
else