#!/bin/bash # custom script for removing Qt release ebuilds # use at your own risk! # make sure you take care of any new patches before running this script # this does not include the qt meta ebuild portdir=$(portageq envvar PORTDIR) RelVer="4.6.1" usage() { echo echo "[remove-qt-tree] Removing Qt-${RelVer} ebuilds" echo echo "Options:" echo " -h : displays this message " echo " -f : Does a full bump " echo " -r : Removes the ebuilds but doesn't commit them" echo " -c : Run commit phase only" echo } remove() { cd $portdir/x11-libs/ for i in qt-{assistant,core,dbus,demo,gui,multimedia,opengl,phonon,qt3support,script,sql,svg,test,webkit,xmlpatterns} ; do pushd ${i} || exit 'cannot pushd' find '.' -type f -name "${i}-${RelVer}*.ebuild"|xargs cvs remove -f echangelog "Drop Qt-${RelVer}" || exit 'cannot echangelog' repoman manifest || exit 'cannot manifest' popd done } check() { cd $portdir/x11-libs/ echo echo "[remove-qt-release] Checking ebuilds with repoman full - abort if needed" echo for i in qt-{assistant,core,dbus,demo,gui,multimedia,opengl,phonon,qt3support,script,sql,svg,test,webkit,xmlpatterns} ; do pushd ${i} || exit 'cannot pushd' repoman full popd done } commit() { cd $portdir/x11-libs/ echo echo "[remove-qt-release] Remove ${RelVer} ebuilds from cvs repo" echo echo "Press 'y' if you are sure about this or 'n' to abort" read choice case "$choice" in y)for i in qt-{assistant,core,dbus,demo,gui,multimedia,opengl,phonon,qt3support,script,sql,svg,test,webkit,xmlpatterns} ; do pushd ${i} || exit 'cannot pushd' repoman commit -m "Removing Qt-${RelVer}" popd done ;; r|"") echo "aborted..." ;; esac } if [[ "$1" == "-h" ]]; then usage elif [[ "$1" == "-f" ]]; then remove check commit elif [[ "$1" == "-r" ]]; then remove check elif [[ "$1" == "-c" ]]; then commit else usage fi