. get_encodings
-for dir in "${filenames:-.}"; do
+for dir in "${@:-.}"; do
cleanup-filenames-recursive.sh "$dir" &&
recode-filenames-recursive.py -f "$from_encoding" -t "$to_encoding" \
"$dir" || exit 1
esac
. get_encodings
-if [ -z "$filenames" ]; then
+
+if [ -z "$1" ]; then
echo "Usage: $0 [-f from_encoding] [-t to_encoding] path [path ...]" >&2
exit 1
fi
-for filename in "$filenames"; do
+for filename in "$@"; do
filename_recoded=`echo "$filename" |
iconv -f "$from_encoding" -t "$to_encoding"`
if [ "$filename_recoded" != "$filename" ]; then