On 22/06/10 09:47, Eric Bélanger wrote:
Signed-off-by: Eric Bélanger<[email protected]>
---
  scripts/makepkg.sh.in |   20 ++++++++++++++++++++
  1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index dbc4047..83d656f 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -159,6 +159,16 @@ clean_up() {
                                        fi
                                done
                        done
+
+                       # clean up dangling symlinks to source packages
+                       for pkg in ${pkgna...@]}; do
+                               for file in ${pkg}-*-*-${CARCH}${SRCEXT}; do
+                                       if [[ -h $file&&  ! -e $file ]]; then
+                                               rm -f $file
+                                       fi
+                               done
+                       done
+
                fi
        fi


I'd prefer just doing something like:

# clean up dangling symlinks to packages
for pkg in ${pkgna...@]}; do
  for file in ${pkg}-*-*-${CARCH}${PKGEXT} ${pkg}-*-*-${CARCH}${SRCEXT}; do
    if [[ -h $file && ! -e $file ]]; then

i.e. just adding to the previous loop.


The rest of the patch is fine.

Allan

Reply via email to