FIX: rfc.sh link detection and discard
This commit is contained in:
parent
5310d8a571
commit
e9a2367600
1 changed files with 11 additions and 3 deletions
14
admin/rfc.sh
14
admin/rfc.sh
|
|
@ -258,9 +258,10 @@ function process_file()
|
|||
exit 1
|
||||
esac
|
||||
|
||||
local oldpath=./doc/devel/rfc_*/$basename
|
||||
local oldpath
|
||||
for oldpath in ./doc/devel/rfc_*/$basename; do :; done
|
||||
|
||||
if [[ "$oldpath" != './doc/devel/rfc_*/'"$basename" ]]; then
|
||||
if [[ -h "$oldpath" ]]; then
|
||||
if [[ "$oldpath" != "$linkdest/$basename" ]]; then
|
||||
git mv "$oldpath" "$linkdest/$basename"
|
||||
fi
|
||||
|
|
@ -454,8 +455,15 @@ comment)
|
|||
;;
|
||||
discard)
|
||||
name=$(unique_name "$1")
|
||||
|
||||
if [[ "$name" ]]; then
|
||||
git rm "${name}"
|
||||
for link in ./doc/devel/rfc_*/${name##*/}; do :; done
|
||||
|
||||
if [[ -h "$link" ]]; then
|
||||
git rm -f "${link}" || rm "${link}"
|
||||
fi
|
||||
|
||||
git rm -f "${name}" || rm "${name}"
|
||||
fi
|
||||
;;
|
||||
wrap)
|
||||
|
|
|
|||
Loading…
Reference in a new issue