From 9c02706d857661ca68351ad932b129150db1bfe0 Mon Sep 17 00:00:00 2001 From: davidovski Date: Mon, 28 Feb 2022 10:56:12 +0000 Subject: fixed search giving error for no query --- src/bootstrap.sh | 2 +- src/install.sh | 4 ++-- src/query.sh | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/bootstrap.sh b/src/bootstrap.sh index 846e8c3..946148b 100644 --- a/src/bootstrap.sh +++ b/src/bootstrap.sh @@ -53,7 +53,7 @@ bootstrap () { sync - install base linux xipkg $@ + install $@ import_keys } diff --git a/src/install.sh b/src/install.sh index 959061a..fa08d33 100644 --- a/src/install.sh +++ b/src/install.sh @@ -64,8 +64,8 @@ run_postinstall () { sh "/var/lib/xipkg/postinstall/$f" && rm $file && printf "${GREEN}run postinstall for $f!\n" - done - rmdir $postinstall + done + rmdir $postinstall 2> /dev/null fi } diff --git a/src/query.sh b/src/query.sh index 1da2e2f..c13cbcf 100644 --- a/src/query.sh +++ b/src/query.sh @@ -10,7 +10,11 @@ list_installed () { } search () { - list | grep $(echo $@ | sed "s/ /\\|/g") + if [ $# = 0 ]; then + list + else + list | grep $(echo $@ | sed "s/ /\\|/g") + fi } files () { -- cgit v1.2.1