Commit c069474e authored by Dan Kegel's avatar Dan Kegel Committed by Alexandre Julliard

tools: Remove bashisms from wineinstall.

parent 45a081f1
...@@ -41,7 +41,7 @@ conf_yesno_answer() { ...@@ -41,7 +41,7 @@ conf_yesno_answer() {
echo "Wine Installer v1.0" echo "Wine Installer v1.0"
echo echo
if ! [ -f configure ] if [ ! -f configure ]
then then
if [ -f ../configure ] if [ -f ../configure ]
then { then {
...@@ -55,7 +55,7 @@ then ...@@ -55,7 +55,7 @@ then
fi fi
fi fi
if [ `whoami` = 'root' ] if [ -w / ]
then then
echo "You are running wineinstall as root, this is not advisable. Please rerun as a user." echo "You are running wineinstall as root, this is not advisable. Please rerun as a user."
echo "Aborting." echo "Aborting."
...@@ -70,9 +70,7 @@ then ...@@ -70,9 +70,7 @@ then
fi fi
# check whether RPM installed, and if it is, remove any old wine rpm. # check whether RPM installed, and if it is, remove any old wine rpm.
hash rpm &>/dev/null if [ -x `which rpm 2>/dev/null` ]; then
RET=$?
if [ $RET -eq 0 ]; then
if [ -n "`rpm -qi wine 2>/dev/null|grep "^Name"`" ]; then if [ -n "`rpm -qi wine 2>/dev/null|grep "^Name"`" ]; then
echo "Warning: Old Wine RPM install detected. Do you want to remove it first?" echo "Warning: Old Wine RPM install detected. Do you want to remove it first?"
conf_yesno_answer "(yes/no) " conf_yesno_answer "(yes/no) "
...@@ -98,7 +96,7 @@ if [ $RET -eq 0 ]; then ...@@ -98,7 +96,7 @@ if [ $RET -eq 0 ]; then
fi fi
# check whether wine binary still available # check whether wine binary still available
if [ -n "`wine --version 2>/dev/null`" ] if [ -x `which wine 2>/dev/null` ] && [ -n "`wine --version 2>/dev/null`" ]
then then
echo "Warning !! wine binary (still) found, which may indicate" echo "Warning !! wine binary (still) found, which may indicate"
echo "a (conflicting) previous installation." echo "a (conflicting) previous installation."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment