head 1.2; access; symbols libdrm-1_0_4:1.1; locks; strict; comment @# @; 1.2 date 2005.10.28.15.25.58; author fxkuehl; state Exp; branches; next 1.1; commitid 1a8a436243054567; 1.1 date 2004.10.05.22.49.51; author fxkuehl; state Exp; branches; next ; desc @@ 1.2 log @Update snapshot build. Include R300 driver. @ text @#!/bin/bash # Note: really need bash due to use of functions. # lndir reimplementation as shell script for a system that has no # X11 installation. set -e if [ -x /usr/X11R6/bin/lndir ]; then exec /usr/X11R6/bin/lndir "$@@" || true echo "Error: couldn't exec lndir! Falling back to shell script." fi silent=0 ignorelinks=0 withrevinfo=0 # recursive function for symlinking 1 directory with all its subdirectories # to the current directory # $1 source function ln1dir() { local source="$1" ls -1a "$source" | while read file; do if [ "$file" = "." -o "$file" = ".." ]; then # ignore . and .. continue elif [ -L "$source/$file" ]; then if [ $ignorelinks = 0 ]; then # copy symbolic links without dereferencing cp -d "$source/$file" . else # ignore links (make symlink as for a normal file) ln -sf "$source/$file" . fi elif [ ! -d "$source/$file" ]; then # everything else that is not a directory is symlinked ln -sf "$source/$file" . else # ignore special subdirectories if [ $withrevinfo = 0 -a \( \ "$file" = RCS -o "$file" = SCCS -o \ "$file" = CVS -o "$file" = CVS.adm \) ]; then continue fi # subdirectories are created at the destination and descended into mkdir -p $file cd $file if [ $silent = 0 ]; then echo "$source/$file:" fi if [ -z "${source%%/*}" ]; then # absolute source path ln1dir "$source/$file" else # relative source path ln1dir "../$source/$file" fi cd .. fi done } function printUsage() { echo "Usage: lndir.sh [-silent] [-ignorelinks] fromdir [todir]" 1>&2 exit 1 } source="" dest="" for arg; do case "$arg" in -silent) silent=1 ;; -ignorelinks) ignorelinks=1 ;; -withrevinfo) withrevinfo=1 ;; *) if [ -z "$source" ]; then source="$arg" elif [ -z "$dest" ]; then dest="$arg" else printUsage fi ;; esac done if [ -z "$source" ]; then printUsage fi if [ -n "$dest" ]; then cd "$dest" fi # strip trailing slashes from source while [ "${source%/}" != "$source" ]; do source="${source%/}" done ln1dir "$source" @ 1.1 log @Reimplemented lndir as a shell script since it is not installed on the snapshot build server. @ text @d9 5 @