source: scripts/repository/filter-continent.bash @ 3721

Revision 3721, 1.3 KB 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 remove duplicated packages
3# from continent APT repo
4# Coyright 2008 Alan Baghumian / GNU/GPL
5#
6# Created: 2008-02-01 10:57 +330 GMT
7# Updated: 2008-05-20 12:28 +330 GMT
8#
9
10if [ -z "${1}" ]; then
11   echo "Unknown distro."
12   exit
13else
14   distro="${1}"
15fi
16
17parsix_repo="/home/parsix/public_html/packages/"
18contnt_repo="/home/parsixpkg/public_html/continent/"
19
20if [ ! -d "${parsix_repo}" ]; then
21    echo "Parsix repository does not exist."
22    exit
23else
24    cd ${parsix_repo}
25fi
26
27# Remove debs first, keep lsb, selinux and base-files, needed for debootstrap at the moment
28list=`find ./pool/ -type f | grep .deb$ | awk 'BEGIN{FS="_"}{print $1}' | grep -v selinux | grep -v lsb | grep -v base-files | xargs -n1 basename | sort -u`
29
30if [ ! -d "${contnt_repo}" ]; then
31    echo "Continent repository does not exist."
32    exit
33else
34    cd ${contnt_repo}
35fi
36
37reprepro -Vb . remove ${distro} ${list}
38
39# Remove  sources then, keep lsb, selinux and base-files, needed for debootstrap at the moment
40list=`find ./pool/ -type f | grep .orig.tar.gz$ | awk 'BEGIN{FS="_"}{print $1}' | grep -v selinux | grep -v lsb | grep -v base-files | xargs -n1 basename | sort -u`
41
42if [ ! -d "${contnt_repo}" ]; then
43    echo "Continent repository does not exist."
44    exit
45else
46    cd ${contnt_repo}
47fi
48
49reprepro -Vb . remove ${distro} ${list}
50
51# Sign!
52../../sign
53
Note: See TracBrowser for help on using the repository browser.