Skip to content

Commit 03f9167

Browse files
committed
reinstall_ndctl.sh: add optional ndctl_src parameter
The added flexibilty is useful when using sshfs Signed-off-by: Marc Herbert <[email protected]>
1 parent 9282549 commit 03f9167

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

mkosi/extra/root/reinstall_ndctl.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
#!/bin/sh
22

3+
#shellcheck disable=SC3043
4+
35
set -e
46
set -x
57

68
MYDIR=$(dirname "$0")
79

810
main()
911
{
10-
cd "$MYDIR"/ndctl
12+
local ndctl_src="$1"
13+
test -n "$ndctl_src" || ndctl_src="$MYDIR"/ndctl
14+
15+
cd "$ndctl_src"
1116
rm -rf build
1217
meson setup build
1318
meson configure -Dtest=enabled -Ddestructive=enabled build
1419
meson compile -C build
1520
meson install -C build
1621
}
1722

18-
main
23+
main "$@"

0 commit comments

Comments
 (0)