Aptly does not strip spaces from architecture names, sigh.
[arvados-dev.git] / jenkins / unpublish.sh
1 #!/bin/bash
2
3 set -x
4
5 if [[ -z "$1" ]] ; then
6     echo "Must provide version number to unpublish"
7     exit 1
8 fi
9
10 VERNO=$1
11 PACKAGE="*"
12
13 if [[ -n "$2" ]] ; then
14     PACKAGE="$2"
15 fi
16
17 rm -f $(find /var/www/rpm.arvados.org/CentOS/7/testing -name "${PACKAGE}-${VERNO}*.rpm")
18 sudo -u jenkinsapt createrepo /var/www/rpm.arvados.org/CentOS/7/testing/x86_64
19
20 for fr in $(ls -d /var/lib/freight/apt/*-testing) ; do
21     rm -f $(find ${fr} -name "${PACKAGE}_${VERNO}*.deb")
22     sudo -u jenkinsapt freight cache ${fr}
23 done
24