summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrepofish8
1 files changed, 6 insertions, 2 deletions
diff --git a/repofish b/repofish
index 8835a2d..3007e51 100755
--- a/repofish
+++ b/repofish
@@ -56,8 +56,12 @@ check_package() {
}
list_packages() {
- echo -e '\033[1;34m:: \033[1;37mPackages locally available:\033[m'
- find ${SRC_PATH}/* -type d -prune | awk -F '/' '{print $NF}'
+ if [ -z "$(ls -A ${SRC_PATH})" ]; then
+ echo -e '\033[1;34m:: \033[1;37mNo packages are locally available!\033[m'
+ else
+ echo -e '\033[1;34m:: \033[1;37mPackages locally available:\033[m'
+ find ${SRC_PATH}/* -type d -prune | awk -F '/' '{print $NF}'
+ fi
}
clean_packages() {