mirror of
https://git.freebsd.org/src.git
synced 2026-01-16 23:02:24 +00:00
rc.subr set dot_dir and dot_file in dot
Files read by '.' cannot workout for themselves where they are or what they are called, so set dot_dir and dot_file to pass this information to them. Reviewed by: obrien, stevek Differential Revision: https://reviews.freebsd.org/D53476
This commit is contained in:
parent
ee1f417a86
commit
a797702be0
1 changed files with 12 additions and 2 deletions
|
|
@ -121,11 +121,22 @@ dotted=
|
|||
dot()
|
||||
{
|
||||
local f verify
|
||||
local dot_dir dot_file
|
||||
|
||||
o_verify_set off verify
|
||||
for f in "$@"; do
|
||||
if [ -f $f -a -s $f ]; then
|
||||
dotted="$dotted $f"
|
||||
case $f in
|
||||
*/*)
|
||||
dot_dir=${f%/*}
|
||||
dot_file=${f##*/}
|
||||
;;
|
||||
*)
|
||||
dot_dir=.
|
||||
dot_file=$f
|
||||
;;
|
||||
esac
|
||||
. $f
|
||||
fi
|
||||
done
|
||||
|
|
@ -152,8 +163,7 @@ vdot()
|
|||
for f in "$@"; do
|
||||
[ -f $f -a -s $f ] || continue
|
||||
if is_verified $f 2> /dev/null; then
|
||||
dotted="$dotted $f"
|
||||
. $f
|
||||
dot $f
|
||||
else
|
||||
rc=80 # EAUTH
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue