function commit_changes {
- if [ -d "$MAKEPKG_REPOS/.svn" ]; then
+ # usage: commit_changes <repository_path>
+
+ local repos="$1" tmpfile
+ shift
+
+ if [ -d "$repos/.svn" ]; then
cwd="`pwd`"
- chown_svn $MAKEPKG_REPOS && chgrp_svn $MAKEPKG_REPOS
- cd $MAKEPKG_REPOS
+ chown_svn $repos && chgrp_svn $repos
+ cd $repos
if [ ! -z "$1" ]; then
- su_svn commit -m "$*"
+ if tmpfile=`mktemp -t createpkg_commit.XXXXXX`; then
+ echo $* > $tmpfile
+ su_svn commit -F $tmpfile
+ rm -f $tmpfile
+ else
+ su_svn commit
+ fi
else
su_svn commit
fi
# Create repository directory
# usage: create_repo_folder <repository_folder>
- local folder
- folder="$1"
+ local folder="$1"
if [ ! -e $folder/$SUBFOLDER ]; then
if [ -d "$folder/.svn" ] && ! svn_check $folder/$SUBFOLDER; then
return 1
fi
- local makepkg_repos
- makepkg_repos="$1"
+ local makepkg_repos="$1"
# Remove old PACKAGEs from repository tree
if [ $REMOVE_OLD_PACKAGE -eq $on ]; then
return 1
fi
- local makepkg_repos
- makepkg_repos="$1"
+ local makepkg_repos="$1"
(
;;
'--commit')
shift
- commit_changes $*
+ commit_changes $MAKEPKG_REPOS $*
+ if [ $MAKEPKG_REPOS_NOARCH -eq $on ]; then
+ commit_changes $NOARCH_REPOS $*
+ fi
exit $EXIT_CODE
;;
'--status')