summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeppia <seppia@seppio.fish>2018-11-27 19:18:12 +0100
committerSeppia <seppia@seppio.fish>2018-11-27 19:18:12 +0100
commitf201fd4e47cf8614de144a81abf57728771fb91e (patch)
treeeb1237ce963022309ee21f505e53d1a1fedbe02a
parent84ff076b41033daf5ceab70acdb6a297534cf7a5 (diff)
downloadrepofish-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-xrepofish4
1 files 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