prefixsubdirs: add exception for "."

This commit is contained in:
Matteo Cypriani 2021-08-26 00:05:58 +02:00
parent bf675c1808
commit 82011595c0
1 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# prefixsubdirs.sh, Copyright © 2018 Matteo Cypriani
# prefixsubdirs.sh, Copyright © 2018, 2021 Matteo Cypriani
#
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
@ -45,6 +45,11 @@ while [ -n "$1" ] ; do
continue
fi
if [ "$dir" = '.' ] ; then
printf 'Warning! Using "." is not (yet) supported and the outcome is most likely not what you want: ignoring.\n' >&2
continue
fi
printf 'Entering "%s" ...\n' "$dir"
prefix_subdirs "$dir"
done