#!/bin/bash # A script with some useful checks for wine before installing software. # Can be used with wine on its own - but crossover office is much better ;). # Set cxwinepath to the path to the wine executable contained in cxoffice. # /opt/cxoffice/bin/wine is default. # By Rob Newland var1="$1" ROOT_UID=0 cxwinepath="/opt/cxoffice/bin/wine" if [ ! "$UID" -ne "$ROOT_UID" ] then echo "You must not be logged in as root"; exit 1 fi if [[ ${#var1} = "0" ]] then echo "Please supply a file name"; exit 1 fi if [[ ! $var1 = *.exe ]] then echo "The file name must end in .exe"; exit 1 fi if [[ ! -e $var1 ]] then echo "$var1 doesnt exist!"; exit 1 else $cxwinepath $var1if fi