gallium: Add pipe_transfer_reference().
[mesa.git] / bin / minstall
index 9795263f9f17a07b29bc3f55a3f68987f648c2d6..8ee96089fa618d7d98866f5bb59420294501eb6b 100755 (executable)
@@ -42,6 +42,8 @@ if [ $# -ge 2 ] ; then
                        exit 0
                fi
 
+               PWDSAVE=`pwd`
+
                # determine file's type
                if [ -h "$FILE" ] ; then
                        #echo $FILE is a symlink
@@ -57,7 +59,6 @@ if [ $# -ge 2 ] ; then
 
                        FILE=`basename "$FILE"`
                        # Go to $DEST and make the link
-                       PWDSAVE="$PWD"
                        cd "$DEST"        # pushd
                                $RM "$FILE"
                                $SYMLINK "$TARGET" "$FILE"
@@ -65,6 +66,7 @@ if [ $# -ge 2 ] ; then
 
                elif [ -f "$FILE" ] ; then
                        #echo "$FILE" is a regular file
+                       $RM "$DEST/`basename $FILE`"
                        cp "$FILE" "$DEST"
                        if [ $MODE ] ; then
                                FILE=`basename "$FILE"`