Re: [PATCH] linguas: Ensure that scripts runs from the directory that it resides
Daniel Kiper <[email protected]>
| Newsgroups | org.gnu.grub-devel |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Nov 09, 2025 at 04:31:52PM -0600, Glenn Washburn wrote: > The script assumes that it is run from the root of the source tree, > which is where it is located. So this should be enforced to prevent > accidental misuses. > > Signed-off-by: Glenn Washburn <[email protected]> > --- > linguas.sh | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/linguas.sh b/linguas.sh > index b95ad4f7d9c2..45cdf2ac14ac 100755 > --- a/linguas.sh > +++ b/linguas.sh > @@ -1,5 +1,10 @@ > #!/bin/sh > > +SDIR=$(realpath -e "$0") SDIR=$(readlink -f "$0") > +SDIR=${SDIR%/*} SDIR=$(dirname "$SDIR") Daniel _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel