Comment out unused function RealFilename

This commit is contained in:
mboelen 2015-12-21 11:26:00 +01:00
parent 526c519300
commit a59731405f

View File

@ -1094,36 +1094,37 @@
# Name : RealFilename() # Name : RealFilename()
# Description : Return file behind a symlink # Description : Return file behind a symlink
# Returns : sFILE # Returns : sFILE
RealFilename() # Notes : This function is unused, use ShowSymlinkPath instead
{ #RealFilename()
sFILE=$1 # {
FileIsWorldExecutable="" # sFILE=$1
SYMLINK=0 # FileIsWorldExecutable=""
# SYMLINK=0
# Check for symlink #
if [ -L ${sFILE} ]; then # # Check for symlink
if [ ! "${READLINKBINARY}" = "" ]; then # if [ -L ${sFILE} ]; then
tFILE=`${READLINKBINARY} -f ${sFILE}` # if [ ! "${READLINKBINARY}" = "" ]; then
# Check if we can find the file now # tFILE=`${READLINKBINARY} -f ${sFILE}`
if [ -f ${tFILE} ]; then # # Check if we can find the file now
rFILE="${tFILE}" # if [ -f ${tFILE} ]; then
logtext "Result: symlink found, pointing to ${sFILE}" # rFILE="${tFILE}"
SYMLINK=1 # logtext "Result: symlink found, pointing to ${sFILE}"
else # SYMLINK=1
# Check the full path of the symlink, strip the filename, copy the path and linked filename together # else
tDIR=`echo ${sFILE} | awk '{match($1, "^.*/"); print substr($1, 1, RLENGTH-1)}'` # # Check the full path of the symlink, strip the filename, copy the path and linked filename together
tFILE="${tDIR}/${tFILE}" # tDIR=`echo ${sFILE} | awk '{match($1, "^.*/"); print substr($1, 1, RLENGTH-1)}'`
if [ -f ${tFILE} ]; then # tFILE="${tDIR}/${tFILE}"
rFILE="${tFILE}" # if [ -f ${tFILE} ]; then
logtext "Result: symlink found, seems to be ${rFILE}" # rFILE="${tFILE}"
fi # logtext "Result: symlink found, seems to be ${rFILE}"
fi # fi
fi # fi
else # fi
# No symlink # else
rFILE="${sFILE}" # # No symlink
fi # rFILE="${sFILE}"
} # fi
# }
################################################################################ ################################################################################