]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
fix on create_repo_folder
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Mon, 15 Dec 2008 14:09:26 +0000 (14:09 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Mon, 15 Dec 2008 14:09:26 +0000 (14:09 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@662 04377dda-e619-0410-9926-eae83683ac58

trunk/src/createpkg

index c4f481bc965181cff6019c1e230e21da8a77ea22..87b465f099ca8a38662ae67164b8a69dc97b7a81 100644 (file)
@@ -114,7 +114,7 @@ function check_config {
   # Nested folders, if configured
   if [ ! -z "$PACKAGES_REPOS_STYLE" ]; then
     PACKAGES_REPOS_STYLE=$(echo $PACKAGES_REPOS_STYLE | sed -e "s/none//g" -e "s/distro/`default_distro`/g" \
-                                                          -e "s/arch/`default_arch`/g" -e "s/version/`default_version`/g")
+                                                            -e "s/arch/`default_arch`/g" -e "s/version/`default_version`/g")
     PACKAGES_DIR="$PACKAGES_DIR/$PACKAGES_REPOS_STYLE"
     REPOS="$REPOS/$PACKAGES_REPOS_STYLE"
   fi
@@ -332,13 +332,14 @@ function create_repo_folder {
   # Create repository directory
   # usage: create_repo_folder <repository_folder>
 
-  local folder="$1"
+  local folder="$1" basedir
 
   if [ ! -d "$folder" ]; then
-    if [ -d "$folder/../.svn" ] && ! svn_check $folder; then
+    basedir="`dirname $folder`"
+    if [ -d "$basedir/.svn" ] && ! svn_check $folder; then
       (
-        cd $folder/..
-        chown_svn $folder/.. && chgrp_svn $folder/..
+        cd $basedir
+        chown_svn $basedir && chgrp_svn $basedir
         svn_mkdir $folder/$SUBFOLDER
       )
     else