summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-09-13 13:36:47 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-09-13 13:36:47 +0000
commit7bb7f9759476ff10b80a8df5b752dd07c0cc511f (patch)
tree04709ec12b868a0f3dce62b4b27149cac68013e6 /bin
parent914ec8ef583519ed8e83e4870b7a9e2ed9247b01 (diff)
fix FreeBSD problem (bug 4435)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/installmesa19
1 files changed, 13 insertions, 6 deletions
diff --git a/bin/installmesa b/bin/installmesa
index bc5864effd..0bfce33c7a 100755
--- a/bin/installmesa
+++ b/bin/installmesa
@@ -12,7 +12,7 @@ TOP=.
INCLUDE_DIR="/usr/local/include"
LIB_DIR="/usr/local/lib"
-if [ x$# == "x0" ] ; then
+if [ "x$#" = "x0" ] ; then
echo
echo "***** Mesa installation - You may need root privileges to do this *****"
echo
@@ -20,7 +20,7 @@ echo "Default directory for header files is:" ${INCLUDE_DIR}
echo "Enter new directory or press <Enter> to accept this default."
read INPUT
-if [ x${INPUT} != "x" ] ; then
+if [ "x${INPUT}" != "x" ] ; then
INCLUDE_DIR=${INPUT}
fi
@@ -29,7 +29,7 @@ echo "Default directory for library files is:" ${LIB_DIR}
echo "Enter new directory or press <Enter> to accept this default."
read INPUT
-if [ x${INPUT} != "x" ] ; then
+if [ "x${INPUT}" != "x" ] ; then
LIB_DIR=${INPUT}
fi
@@ -47,7 +47,14 @@ fi
# flags:
# -f = force
-# -d = preserve symlinks
+# -d = preserve symlinks (does not work on BSD)
+
+if [ `uname` = "FreeBSD" ] ; then
+ CP_FLAGS="-f"
+else
+ CP_FLAGS="-fd"
+fi
+
set -v
@@ -56,7 +63,7 @@ mkdir ${INCLUDE_DIR}/GL
mkdir ${INCLUDE_DIR}/GLES
mkdir ${LIB_DIR}
cp -f ${TOP}/include/GL/*.h ${INCLUDE_DIR}/GL
-cp -f ${TOP}/include/GLES/*.h ${INCLUDE_DIR}/GLES
-cp -fd ${TOP}/lib*/lib* ${LIB_DIR}
+# NOT YET: cp -f ${TOP}/include/GLES/*.h ${INCLUDE_DIR}/GLES
+cp ${CP_FLAGS} ${TOP}/lib*/lib* ${LIB_DIR}
echo "Done."