testprogs: Use system_or_builddir_binary() for tombstones-expunge
authorAndreas Schneider <asn@samba.org>
Thu, 22 Dec 2022 13:42:12 +0000 (14:42 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 23 Dec 2022 14:35:31 +0000 (14:35 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
testprogs/blackbox/tombstones-expunge.sh

index 27f80849045bdd3bc75b424c1b218b485e3fb37b..a1a6d02e83b301bdecb06b28a02338a15817589e 100755 (executable)
@@ -18,30 +18,10 @@ failed=0
 
 release_dir="$SRCDIR_ABS/source4/selftest/provisions/$RELEASE"
 
-ldbadd="ldbadd"
-if [ -x "$BINDIR/ldbadd" ]; then
-       ldbadd="$BINDIR/ldbadd"
-fi
-
-ldbmodify="ldbmodify"
-if [ -x "$BINDIR/ldbmodify" ]; then
-       ldbmodify="$BINDIR/ldbmodify"
-fi
-
-ldbdel="ldbdel"
-if [ -x "$BINDIR/ldbdel" ]; then
-       ldbdel="$BINDIR/ldbdel"
-fi
-
-ldbsearch="ldbsearch"
-if [ -x "$BINDIR/ldbsearch" ]; then
-       ldbsearch="$BINDIR/ldbsearch"
-fi
-
-samba_tdbrestore="tdbrestore"
-if [ -x "$BINDIR/tdbrestore" ]; then
-       samba_tdbrestore="$BINDIR/tdbrestore"
-fi
+ldbadd=$(system_or_builddir_binary ldbadd "${BINDIR}")
+ldbmodify=$(system_or_builddir_binary ldbmodify "${BINDIR}")
+ldbsearch=$(system_or_builddir_binary ldbsearch "${BINDIR}")
+samba_tdbrestore=$(system_or_builddir_binary tdbrestore "${BINDIR}")
 
 samba_undump="$SRCDIR_ABS/source4/selftest/provisions/undump.sh"
 if [ ! -x $samba_undump ] || [ ! -d $release_dir ]; then