summaryrefslogtreecommitdiffstats
path: root/cleanup-scripts
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2008-05-07 08:06:21 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2008-05-07 08:06:57 +0200
commit511759504993c858d977b649cd02cf7969811b57 (patch)
tree3e98d0b862e5ccb7776d7ccd5cb92e6d259c6c04 /cleanup-scripts
parentcbd6533816b1c27aab268b5c8f823345be8e12ed (diff)
downloaddbscripts-511759504993c858d977b649cd02cf7969811b57.tar.gz
dbscripts-511759504993c858d977b649cd02cf7969811b57.tar.xz
Moving some files around, organizational
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'cleanup-scripts')
-rwxr-xr-xcleanup-scripts/cleanup2.sh46
1 files changed, 0 insertions, 46 deletions
diff --git a/cleanup-scripts/cleanup2.sh b/cleanup-scripts/cleanup2.sh
deleted file mode 100755
index 4a79654..0000000
--- a/cleanup-scripts/cleanup2.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/bash
-
-usage() {
- echo "Usage: $0 repo architecture"
-}
-
-getpkgname() {
- local tmp
-
- tmp=${1##*/}
- tmp=${tmp%.pkg.tar.gz}
- tmp=${tmp%-i686}
- tmp=${tmp%-x86_64}
- echo ${tmp%-*-*}
-}
-
-FTPBASEDIR="/home/ftp"
-FTPDIR=${FTPBASEDIR}/${1}/os/${2}
-DBFILE=${FTPDIR}/${1}.db.tar.gz
-OBSOLETEFILES=""
-
-if [ $# -lt 2 -o ! -f ${DBFILE} ]; then
- usage
- exit 1
-fi
-
-TMPDIR=$(mktemp -d /tmp/cleanup.XXXXXX) || exit 1
-cd ${TMPDIR}
-tar xzf ${DBFILE}
-
-cd ${FTPDIR}
-for pkgfile in *.pkg.tar.gz; do
- pkgname="$(getpkgname ${pkgfile})"
- for p in ${FTPDIR}/${pkgname}-*; do
- if [ "$(getpkgname $(basename ${p}))" = "${pkgname}" ]; then
- continue 2
- fi
- done
- OBSOLETEFILES="${OBSOLETEFILES} ${pkgfile}"
-done
-
-cd - >/dev/null
-rm -rf ${TMPDIR}
-
-echo -ne "DIRECTORY:\n${FTPDIR}\n\n"
-echo -ne "OBSOLETEFILES:\n${OBSOLETEFILES}\n\n"