summaryrefslogtreecommitdiff
path: root/kde-base/cleanup-kde-l10n.sh
blob: 85c599a7ecd2457f1a80d95ebadc2a53ee660df1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

# The purpose of this script is to delete old versions
# of the kde-l10n ebuilds.
#
# This script requires two preset parameters:
# DEL_VERSIONS:  The versions to be deleted.
# SURVIVOR_VERSION: A survivor version to be used
#                   for rebuilding the manifests

DEL_VERSIONS="4.9.5 4.10.0 4.10.1 4.10.2 4.10.3 4.10.4 4.10.5 4.11.0 4.11.1 4.11.2 4.11.3"
SURVIVOR_VERSION="4.11.4"

# Remove/Delete the old versions.
for one_del_ver in $DEL_VERSIONS; do
    if [ "$one_del_ver" = "$SURVIVOR_VERSION" ]; then
	    echo ""
	    echo "Skipping $one_del_ver. It is the version that has to be kept."
	    continue
    fi

    for X in $(find -name "kde-l10n-*${one_del_ver}*.ebuild"); do
        git rm -f "${X}"
    done
done

# Regenerate the manifests based on a survivor version
for X in $(find -name "kde-l10n-*${SURVIVOR_VERSION}*.ebuild"); do
	ebuild "${X}" manifest
done