source: scripts/repository/repo-clean-up.bash @ 3721

Revision 3721, 790 bytes checked in by alanbach-guest, 6 years ago (diff)
  • Updated to cover source files too
  • Property svn:executable set to *
Line 
1#!/bin/bash
2# Bash script to clean-up old Parsix APT repos
3# Coyright 2008 Alan Baghumian / GNU/GPL
4#
5# Created: 2008-01-26 14:57 +330 GMT
6# Updated: 2008-05-20 12:21 +330 GMT
7
8if [ -z "${1}" ]; then
9   echo "Unknown distro."
10   exit
11else
12   distro="${1}"
13fi
14
15parsix_repo="/home/parsix/public_html/packages/"
16
17if [ ! -d "${parsix_repo}" ]; then
18    echo "Parsix repository does not exist."
19    exit
20else
21    cd ${parsix_repo}
22fi
23
24# Remove debs first
25list=`find ./pool/ -type f | grep .deb$ | awk 'BEGIN{FS="_"}{print $1}' | xargs -n1 basename | sort -u`
26reprepro -Vb . remove ${distro} ${list}
27
28# Remove sources then
29list=`find ./pool/ -type f | grep .orig.tar.gz$ | awk 'BEGIN{FS="_"}{print $1}' | xargs -n1 basename | sort -u`
30reprepro -Vb . remove ${distro} ${list}
31
32# Sign!
33../../sign
34
Note: See TracBrowser for help on using the repository browser.