git: tools/gitrev.sh: Remove duplicate "cd" command
Aaron LI
aly at crater.dragonflybsd.org
Mon Aug 17 18:49:07 PDT 2026
commit 22b0532048862576c5b86662d542247412372265
Author: Aaron LI <aly at aaronly.me>
Date: Tue Aug 18 09:28:01 2026 +0800
tools/gitrev.sh: Remove duplicate "cd" command
The 'cd $srcdir' was added in commit
f5a0be5909f64049304cc253123a5f9e4c5f38a3, which can cause the later
'cd $(dirname $0)' to fail, e.g.,
```
% sh ./sys/conf/../../tools/gitrev.sh
cd: ./sys/conf/../../tools: No such file or directory
$ bash ./sys/conf/../../tools/gitrev.sh
./sys/conf/../../tools/gitrev.sh: line 14: cd: ./sys/conf/../../tools: No such file or directory
```
The above invocation happens with:
```
$ env KERN_IDENT=XXX sh ./sys/conf/newvers.sh
```
So fix the issue by removing the duplicate "cd" command in gitrev.sh.
Summary of changes:
tools/gitrev.sh | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/22b0532048862576c5b86662d542247412372265
--
DragonFly BSD source repository
More information about the Commits
mailing list