Epic stupid.. I forgot the `pwd` and trailing /, disregard this. Leaving the text up for a good laugh.
Maybe I'm just wicked tired, or I'm totally stupid. But I can't see where the problem is. I keep getting an unexpected operator at line 44, and if I remove said operator, I get another message. So here goes... halp?
Error before removing line 44:
kruesephiikz@kaos:~$ sh winebuild
Archive found. [ /home/kruesephiikz/wine-1.1.44.tar.bz2 ] correct? [ Y/N ]
y
Archive correct, move along.
[: 44: wine-1.1.44: unexpected operator
Something went wrong. Check error.
Error after removing line 44:
kruesephiikz@kaos:~$ sh winebuild
Archive found. [ /home/kruesephiikz/wine-1.1.44.tar.bz2 ] correct? [ Y/N ]
y
Archive correct, move along.
winebuild: 104: Syntax error: end of file unexpected (expecting "fi")
Line 44 content:
fi
Sript:
#!/bin/sh
if [ -f `pwd`/wine*.tar.bz2 ]
then
echo Archive found. [ `pwd`/wine-*.bz2 ] correct? [ Y/N ]
read yn1
case $yn1
in
"y") echo "Archive correct, move along."
sleep 2
break;;
"n") echo "Archive incorrect, kill script."
exit;;
esac
else
echo Archive not found... abort
exit
fi
if [ -d wine-* ]
then
echo Previous directory found, remove? [ Y/N ]
read yn2
case $yn2
in
"y") echo "Deleting old directory."
rm -r `pwd`/wine-*/
echo "Extracting Wine archive."
sleep 2
tar -xvf `pwd`/wine-*.tar.bz2
break;;
"n") echo "Cannot delete, exit."
exit;;
esac
else
if [ $? -ne 0 ]
then
echo Something went wrong. Check error.
exit
fi
echo Directory not found, continuing to extract.
sleep 2
tar -xvf `pwd`/wine-*.tar.bz2
fi
echo Compile starting, change directory.
sleep 2
cd wine-*
echo Create symlinks? [ Ubuntu-64 Users Only ] [ Y/N ]
read yn3
case $yn3
in
"y") echo "Creating Symlinks, please wait."
sleep 2
mkdir -p `pwd`/lib32
ln -s /usr/lib32/libX11.so.6 `pwd`/lib32/libX11.so
ln -s /usr/lib32/libXext.so.6 `pwd`/lib32/libXext.so
ln -s /usr/lib32/libfreetype.so.6 `pwd`/lib32/libfreetype.so
ln -s /usr/lib32/libfontconfig.so.1 `pwd`/lib32/libfontconfig.so
ln -s /usr/lib32/libGL.so.1 `pwd`/lib32/libGL.so
ln -s /usr/lib32/libGLU.so.1 `pwd`/lib32/libGLU.so
ln -s /usr/lib32/libXrender.so.1 `pwd`/lib32/libXrender.so
ln -s /usr/lib32/libXinerama.so.1 `pwd`/lib32/libXinerama.so
ln -s /usr/lib32/libXxf86vm.so.1 `pwd`/lib32/libXxf86vm.so
ln -s /usr/lib32/libXi.so.6 `pwd`/lib32/libXi.so
ln -s /usr/lib32/libXrandr.so.2 `pwd`/lib32/libXrandr.so
ln -s /usr/lib32/liblcms.so.1 `pwd`/lib32/liblcms.so
ln -s /usr/lib32/libpng12.so.0 `pwd`/lib32/libpng.so
ln -s /usr/lib32/libcrypto.so.0.9.8 `pwd`/lib32/libcrypto.so
ln -s /usr/lib32/libssl.so.0.9.8 `pwd`/lib32/libssl.so
ln -s /usr/lib32/libxml2.so.2 `pwd`/lib32/libxml2.so
ln -s /usr/lib32/libjpeg.so.62 `pwd`/lib32/libjpeg.so
ln -s /usr/lib32/libXcomposite.so.1 `pwd`/lib32/libXcomposite.so
ln -s /usr/lib32/libcups.so.2 `pwd`/lib32/libcups.so
ln -s /usr/lib32/libXcursor.so.1 `pwd`/lib32/libXcursor.so
ln -s /lib32/libdbus-1.so.3 `pwd`/lib32/libdbus-1.so
ln -s /usr/lib32/libhal.so.1 `pwd`/lib32/libhal.so
ln -s /usr/lib32/libsane.so.1 `pwd`/lib32/libsane.so
ln -s /usr/lib32/libgphoto2.so.2 `pwd`/lib32/libgphoto2.so
ln -s /usr/lib32/libgphoto2_port.so.0 `pwd`/lib32/libgphoto2_port.so
ln -s /usr/lib32/libldap-2.4.so.2 `pwd`/lib32/libldap.so
ln -s /usr/lib32/libldap_r-2.4.so.2 `pwd`/lib32/libldap_r.so
ln -s /usr/lib32/liblber-2.4.so.2 `pwd`/lib32/liblber.so
ln -s /usr/lib32/libxslt.so.1 `pwd`/lib32/libxslt.so
ln -s /usr/lib32/libcapi20.so.3 `pwd`/lib32/libcapi20.so
ln -s /usr/lib32/libjack.so.0 `pwd`/lib32/libjack.so
ln -s /usr/lib32/libodbc.so.1 `pwd`/lib32/libodbc.so
ln -s /usr/lib32/libgnutls.so.26 `pwd`/lib32/libgnutls.so
echo "Symlinks created."
sleep 2
break;;
"n") echo "Hopefully a non 64-bit user. If you are on 64-bit Ubuntu, CTRL-C Now and restart."
sleep 1
break;;
esac
echo Compiling now!
sleep 2
CC="gcc-4.4 -m32" LDFLAGS="-L/lib32 -L/usr/lib32 -L`pwd`/lib32 -Wl,-rpath,/lib32 -Wl,-rpath,/usr/lib32" ./configure -v
make -j5 -s depend
make -j5 -s
wineserver -k
sudo make -j5 install
Thanks a ton for taking a look.
Believe it or not, the script works like a charm if the directory isn't found. If it is, however, this is the error I receive.