Only commit if needed
This commit is contained in:
parent
e64c1d33eb
commit
c51cc8d365
40
commitpkg
40
commitpkg
|
@ -108,29 +108,31 @@ if [ "$1" = "-a" ]; then
|
||||||
shift 2
|
shift 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n 'committing changes to trunk...'
|
if [ -n "$(svn status -q)" ]; then
|
||||||
msgtemplate="upgpkg: $pkgbase $(get_full_version ${epoch:-0} $pkgver $pkgrel)
|
echo -n 'committing changes to trunk...'
|
||||||
|
msgtemplate="upgpkg: $pkgbase $(get_full_version ${epoch:-0} $pkgver $pkgrel)
|
||||||
|
|
||||||
"
|
"
|
||||||
if [ -n "$1" ]; then
|
if [ -n "$1" ]; then
|
||||||
svn commit -q -m "${msgtemplate}${1}" || abort
|
svn commit -q -m "${msgtemplate}${1}" || abort
|
||||||
else
|
|
||||||
msgfile="$(mktemp)"
|
|
||||||
echo "$msgtemplate" > "$msgfile"
|
|
||||||
if [ -n "$SVN_EDITOR" ]; then
|
|
||||||
$SVN_EDITOR "$msgfile"
|
|
||||||
elif [ -n "$VISUAL" ]; then
|
|
||||||
$VISUAL "$msgfile"
|
|
||||||
elif [ -n "$EDITOR" ]; then
|
|
||||||
$EDITOR "$msgfile"
|
|
||||||
else
|
else
|
||||||
vi "$msgfile"
|
msgfile="$(mktemp)"
|
||||||
|
echo "$msgtemplate" > "$msgfile"
|
||||||
|
if [ -n "$SVN_EDITOR" ]; then
|
||||||
|
$SVN_EDITOR "$msgfile"
|
||||||
|
elif [ -n "$VISUAL" ]; then
|
||||||
|
$VISUAL "$msgfile"
|
||||||
|
elif [ -n "$EDITOR" ]; then
|
||||||
|
$EDITOR "$msgfile"
|
||||||
|
else
|
||||||
|
vi "$msgfile"
|
||||||
|
fi
|
||||||
|
[ -s "$msgfile" ] || abort
|
||||||
|
svn commit -q -F "$msgfile" || abort
|
||||||
|
unlink "$msgfile"
|
||||||
fi
|
fi
|
||||||
[ -s "$msgfile" ] || abort
|
echo 'done'
|
||||||
svn commit -q -F "$msgfile" || abort
|
|
||||||
unlink "$msgfile"
|
|
||||||
fi
|
fi
|
||||||
echo 'done'
|
|
||||||
|
|
||||||
declare -a uploads
|
declare -a uploads
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue