Skip to content

Commit 5c91ed9

Browse files
committed
fix scratch_search when only single port exist in repo
1 parent fd39044 commit 5c91ed9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scratch

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,11 @@ scratch_search() {
959959
arg=$*
960960
for repo in $PORT_REPO; do
961961
[ -d $repo ] || continue
962-
out=$(grep -R "# description" $repo/*/$BUILD_SCRIPT | grep -i "$arg" | awk -F : '{print $1}' | sort)
962+
dummyport=/tmp/dummyport
963+
mkdir -p $dummyport
964+
touch $dummyport/spkgbuild
965+
out=$(grep -R "# description" $repo/*/$BUILD_SCRIPT /tmp/dummy-port/spkgbuild | grep -i "$arg" | awk -F : '{print $1}' | sort)
966+
rm -fr $dummyport
963967
[ "$out" ] || continue
964968
found=1
965969
for line in $out; do

0 commit comments

Comments
 (0)