Changeset View
Changeset View
Standalone View
Standalone View
Tools/scripts/rmport
| Show First 20 Lines • Show All 237 Lines • ▼ Show 20 Lines | if [ -n "${PRs}" ] ; then | ||||
| if [ "${answer}" = "y" ] ; then | if [ "${answer}" = "y" ] ; then | ||||
| return 1 | return 1 | ||||
| else | else | ||||
| return 0 | return 0 | ||||
| fi | fi | ||||
| fi | fi | ||||
| return 0 | return 0 | ||||
| } | |||||
| # check if anything about the port is mentioned in ports/LEGAL | |||||
| check_LEGAL() | |||||
| { | |||||
| catport=${1} | |||||
| pkgname=${2} | |||||
| for checkstr in ${pkgname} ${catport} ; do | |||||
| msg="${catport}: checking if ${checkstr} is in ports/LEGAL" | |||||
| log "${msg}" | |||||
| while grep -i ${checkstr} LEGAL ; do | |||||
| echo "" >&2 | |||||
| echo "${checkstr} is in ports/LEGAL" >&2 | |||||
| echo "remove it and hit <enter> when ready" >&2 | |||||
| echo "or hit 's' to skip this issue and continue anyway" >&2 | |||||
| read answer | |||||
| if [ "${answer}" = "s" ] ; then | |||||
| break | |||||
| fi | |||||
| log "${msg}" | |||||
| done | |||||
| done | |||||
| ${GIT} add LEGAL | |||||
| } | } | ||||
| # add port's entry to ports/MOVED | # add port's entry to ports/MOVED | ||||
| edit_MOVED() | edit_MOVED() | ||||
| { | { | ||||
| catport=${1} | catport=${1} | ||||
| DEPRECATED="$(make -C ${PORTSDIR}/${catport} -V DEPRECATED)" | DEPRECATED="$(make -C ${PORTSDIR}/${catport} -V DEPRECATED)" | ||||
| ▲ Show 20 Lines • Show All 171 Lines • ▼ Show 20 Lines | for catport in $* ; do | ||||
| if ! check_dep ${catport} 1 "${*}" ; then | if ! check_dep ${catport} 1 "${*}" ; then | ||||
| continue | continue | ||||
| fi | fi | ||||
| if ! check_PRs ${catport} ${port} ; then | if ! check_PRs ${catport} ${port} ; then | ||||
| continue | continue | ||||
| fi | fi | ||||
| check_LEGAL ${catport} ${pkgname} | |||||
| # everything seems ok, edit the files | # everything seems ok, edit the files | ||||
| edit_MOVED ${catport} | edit_MOVED ${catport} | ||||
| edit_Makefile ${cat} ${port} | edit_Makefile ${cat} ${port} | ||||
| append_Template ${catport} | append_Template ${catport} | ||||
| Show All 11 Lines | |||||
| answer=y | answer=y | ||||
| while [ "${answer}" = "y" ] ; do | while [ "${answer}" = "y" ] ; do | ||||
| ${GIT} diff --staged --irreversible-delete | ${GIT} diff --staged --irreversible-delete | ||||
| echo "" >&2 | echo "" >&2 | ||||
| echo "you can now edit files by hand" >&2 | echo "you can now edit files by hand" >&2 | ||||
| answer=$(ask "do you want to recreate the diff") | answer=$(ask "do you want to recreate the diff") | ||||
| if [ "${answer}" = "y" ] ; then | if [ "${answer}" = "y" ] ; then | ||||
| ${GIT} add LEGAL MOVED | ${GIT} add MOVED | ||||
| fi | fi | ||||
| done | done | ||||
| commit | commit | ||||
| cleanup | cleanup | ||||
| # EOF | # EOF | ||||