summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2008-02-16 13:50:25 +0100
committerThomas Bächler <thomas@archlinux.org>2008-02-16 13:50:25 +0100
commit29a77254307e42ba0959fe7660aa3d0d76285e6a (patch)
treefce1b4090f5ca862c169283c7f4412d3b603f003
parent410d14a1f9f22bf3f52a58f732305020c29e3141 (diff)
downloaddbscripts-29a77254307e42ba0959fe7660aa3d0d76285e6a.tar.gz
dbscripts-29a77254307e42ba0959fe7660aa3d0d76285e6a.tar.xz
Commited cleanup script to db-inc/genpkglist
-rw-r--r--db-inc2
-rwxr-xr-xftpdir-cleanup (renamed from cleanup-scripts/cleanup.sh)4
-rwxr-xr-xgenpkglist33
3 files changed, 6 insertions, 33 deletions
diff --git a/db-inc b/db-inc
index 32fc9f1..e86f87f 100644
--- a/db-inc
+++ b/db-inc
@@ -167,6 +167,8 @@ if [ "$updatelists" ]; then
fi
fi
+$ARCHDIR/ftpdir-cleanup $reponame $arch
+
cleanup
# vim: set ts=2 noet ft=sh:
diff --git a/cleanup-scripts/cleanup.sh b/ftpdir-cleanup
index cdb0cef..df400bd 100755
--- a/cleanup-scripts/cleanup.sh
+++ b/ftpdir-cleanup
@@ -51,3 +51,7 @@ rm -rf ${TMPDIR}
echo -ne "DIRECTORY:\n${FTPDIR}\n\n"
echo -ne "DELETEFILES:\n${DELETEFILES}\n\n"
echo -ne "MISSINGFILES:\n${MISSINGFILES}\n\n"
+
+cd ${FTPDIR}
+mv ${DELETEFILES} /home/package-cleanup/
+cd -
diff --git a/genpkglist b/genpkglist
index ed91b0c..d026916 100755
--- a/genpkglist
+++ b/genpkglist
@@ -41,36 +41,3 @@ for category in `find * -maxdepth 0 -type d | grep -v CVS`; do
done
cd ..
done
-
-cd $ftppath
-unset DUPES DUPEFILES last
-for pkg in *.pkg.tar.gz; do
- pkgname=$(getpkgname $pkg)
- if [ "$last" = "$pkgname" ]; then
- DUPES="$DUPES $pkgname"
- DUPEFILES="$DUPEFILES $pkg"
- fi
- last=$pkgname
-done
-
-showdupes() {
- done=
- for i in *.pkg.tar.gz; do
- pkgname=$(getpkgname $i)
- if [ "$pkgname" = "$1" ]; then
- ls -l $i | awk '{print $6" "$7" "$8" "$9}'
- done=1
- else
- [ "$done" = "1" ] && return
- fi
- done
-}
-
-if [ "$DUPES" ]; then
- echo "Possible Dupes for $ftppath (remove old versions)"
- echo "Date Filename"
- for dupe in $((for d in `echo $DUPES`; do echo $d; done) | sort -u); do
- showdupes $dupe
- done
-fi
-