diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-11-30 15:48:19 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-11-30 15:48:19 +0000 |
commit | 52140d8d2d05c6685d155fa40d9ff061a802a534 (patch) | |
tree | e5ac3f9d6c65bf96165bdb8cd90751ae85c355d7 /trunk/src | |
parent | 954a0dfaec9123c4f565e22e539d4630df63b4c1 (diff) | |
download | simplepkg-52140d8d2d05c6685d155fa40d9ff061a802a534.tar.gz simplepkg-52140d8d2d05c6685d155fa40d9ff061a802a534.tar.bz2 |
createpkg: fixes on createpkg_commit
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@613 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/src')
-rw-r--r-- | trunk/src/createpkg | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/trunk/src/createpkg b/trunk/src/createpkg index e6f0a1a..4840230 100644 --- a/trunk/src/createpkg +++ b/trunk/src/createpkg @@ -299,12 +299,23 @@ function repository_status { 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 @@ -320,8 +331,7 @@ function create_repo_folder { # 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 @@ -346,8 +356,7 @@ function remove_old_package_data { 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 @@ -414,8 +423,7 @@ function update_metadata { return 1 fi - local makepkg_repos - makepkg_repos="$1" + local makepkg_repos="$1" ( @@ -548,7 +556,10 @@ case $1 in ;; '--commit') shift - commit_changes $* + commit_changes $MAKEPKG_REPOS $* + if [ $MAKEPKG_REPOS_NOARCH -eq $on ]; then + commit_changes $NOARCH_REPOS $* + fi exit $EXIT_CODE ;; '--status') |