From f201fd4e47cf8614de144a81abf57728771fb91e Mon Sep 17 00:00:00 2001 From: Seppia Date: Tue, 27 Nov 2018 19:18:12 +0100 Subject: Clean function iprovement Limits the search for packages to be cleanded only in package specific folders, so time required to clean the package files should now only depend on the single package size not affecting other packages any more. --- repofish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repofish b/repofish index 3007e51..0a2bfec 100755 --- a/repofish +++ b/repofish @@ -69,7 +69,7 @@ clean_packages() { declare -a pkg=("${!1}") echo -e '\033[1;34m:: \033[1;37mCleaning following packages: '"${pkg[@]}"'\033[m' for i in "${pkg[@]}"; do - find ${SRC_PATH} -type f -iname "*$i*.pkg.tar.xz" -exec rm {} \; + find ${SRC_PATH}/$i -type f -iname "*$i*.pkg.tar.xz" -exec rm {} \; done else echo -e '\033[1;34m:: \033[1;37mCleaning all packages\033[m' @@ -159,7 +159,7 @@ update_repo() { declare -a pkg=("${!1}") echo -e '\033[1;34m:: \033[1;37mUpdating following packages in local repository: '"${pkg[@]}"'\033[m' for i in "${pkg[@]}"; do - find ${SRC_PATH} -type f -iname "*$i*pkg.tar.xz" -exec cp {} ${REPO_PATH}/${ARCH}/ \; + find ${SRC_PATH}/$i -type f -iname "*$i*pkg.tar.xz" -exec cp {} ${REPO_PATH}/${ARCH}/ \; repo-add ${REPO_PATH}/${ARCH}/${REPO_NAME}.db.tar.gz ${REPO_PATH}/${ARCH}/*$i*.pkg.tar.xz done else -- cgit v1.2.3