diff options
author | Seppia <seppia@seppio.fish> | 2018-11-27 19:18:12 +0100 |
---|---|---|
committer | Seppia <seppia@seppio.fish> | 2018-11-27 19:18:12 +0100 |
commit | f201fd4e47cf8614de144a81abf57728771fb91e (patch) | |
tree | eb1237ce963022309ee21f505e53d1a1fedbe02a | |
parent | 84ff076b41033daf5ceab70acdb6a297534cf7a5 (diff) | |
download | repofish-f201fd4e47cf8614de144a81abf57728771fb91e.tar.gz repofish-f201fd4e47cf8614de144a81abf57728771fb91e.tar.bz2 repofish-f201fd4e47cf8614de144a81abf57728771fb91e.zip |
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.
-rwxr-xr-x | repofish | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |