diff options
author | Seppia <seppia@seppia.net> | 2018-06-11 13:52:12 +0200 |
---|---|---|
committer | Seppia <seppia@seppia.net> | 2018-06-11 13:52:12 +0200 |
commit | 84ff076b41033daf5ceab70acdb6a297534cf7a5 (patch) | |
tree | d229437db3225942d9ae311e89abe999b7c98b87 | |
parent | d5347710cc0a3d0f65c5a601e72fe021a28b3eef (diff) | |
download | repofish-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-x | repofish | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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() { |