mirror of https://github.com/wwarthen/RomWBW.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
403 B
16 lines
403 B
#!/bin/bash
|
|
# given a filename on the command line, echo the form of the file that
|
|
# actually can be opened. this needs to do filesystem case shenanigans
|
|
#
|
|
for infn in $* ; do
|
|
dir=$(dirname $infn)
|
|
lowname=$(basename $infn | tr '[A-Z]' '[a-z]')
|
|
cd $dir
|
|
for i in * ; do
|
|
cand=$(basename ./"$i" | tr '[A-Z]' '[a-z]')
|
|
if [ ./"$cand" = ./$lowname ] ; then
|
|
echo -n "$dir/$i "
|
|
fi
|
|
done
|
|
done
|
|
echo
|
|
|