diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-12-18 13:41:18 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-12-18 13:41:18 +0000 |
commit | d29bd832745a24bca9b330c342b5a3492d231ad7 (patch) | |
tree | e15f0f42b958ade005ff7f369a09acc4f8369d09 | |
parent | f0e2e6ed6ccace548ceda5f82d31d841d11e6a67 (diff) | |
download | simplepkg-d29bd832745a24bca9b330c342b5a3492d231ad7.tar.gz simplepkg-d29bd832745a24bca9b330c342b5a3492d231ad7.tar.bz2 |
minor fixes
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@683 04377dda-e619-0410-9926-eae83683ac58
-rw-r--r-- | trunk/lib/common.sh | 21 | ||||
-rw-r--r-- | trunk/src/createpkg | 3 | ||||
-rwxr-xr-x | trunk/src/templatepkg | 21 |
3 files changed, 24 insertions, 21 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh index 26c550f..c4224c8 100644 --- a/trunk/lib/common.sh +++ b/trunk/lib/common.sh @@ -799,6 +799,27 @@ function commit_changes { } +function check_svn_repo { + + # check a svn repository URL + # usage: set_svn_repo <repository> + + if [ ! -z "$1" ]; then + if echo $1 | grep -q -v -e "^svn://"; then + if echo $1 | grep -q -v -e "svn+.\+://"; then + if echo $1 | grep -q -v -e "^file://"; then + echo $BASENAME: invalid repository URL $1 + return 1 + fi + fi + fi + else + echo $BASENAME: no repository defined + return 1 + fi + +} + # ----------------------------------------------- # update jail functions # ----------------------------------------------- diff --git a/trunk/src/createpkg b/trunk/src/createpkg index 3fe392b..4b48854 100644 --- a/trunk/src/createpkg +++ b/trunk/src/createpkg @@ -716,7 +716,10 @@ if [ $SIGN_PACKAGES -eq $on ]; then fi if [ ! -z "$SIGN_PACKAGES_USER" ]; then + REPOSITORY_OWNER="$(get_owner $(dirname $PACKAGES_DIR))" + chown $SIGN_PACKAGES_USER `dirname $PACKAGES_DIR` su $SIGN_PACKAGES_USER -c "gpg --use-agent --armor -sb -u $SIGN_KEYID $PACKAGES_DIR/$PKG_NAME" + chown $REPOSITORY_OWNER `dirname $PACKAGES_DIR` else gpg --use-agent --armor -sb -u $SIGN_KEYID $PACKAGES_DIR/$PKG_NAME fi diff --git a/trunk/src/templatepkg b/trunk/src/templatepkg index 3f0284a..8d98950 100755 --- a/trunk/src/templatepkg +++ b/trunk/src/templatepkg @@ -147,27 +147,6 @@ function usage { } -function check_svn_repo { - - # check a svn repository URL - # usage: set_svn_repo <repository> - - if [ ! -z "$1" ]; then - if echo $1 | grep -q -v -e "^svn://"; then - if echo $1 | grep -q -v -e "^svn+ssh://"; then - if echo $1 | grep -q -v -e "^file://"; then - echo $BASENAME: invalid repository URL $1 - return 1 - fi - fi - fi - else - echo $BASENAME: no repository defined - return 1 - fi - -} - function import_export_templates { # import from or export to $TEMPLATE_FOLDER in a svn repository |