summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeppia <seppia@seppia.net>2018-06-11 13:52:12 +0200
committerSeppia <seppia@seppia.net>2018-06-11 13:52:12 +0200
commit84ff076b41033daf5ceab70acdb6a297534cf7a5 (patch)
treed229437db3225942d9ae311e89abe999b7c98b87
parentd5347710cc0a3d0f65c5a601e72fe021a28b3eef (diff)
downloadrepofish-84ff076b41033daf5ceab70acdb6a297534cf7a5.tar.gz
repofish-84ff076b41033daf5ceab70acdb6a297534cf7a5.tar.bz2
repofish-84ff076b41033daf5ceab70acdb6a297534cf7a5.zip
List bug fixv0.3.1
Fixes a bug that happens when listing local packages and no packages are present in local path. It now prints a waring, saying that no local package is present.
-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() {