From 46c7ff331677e4f4250b0139d40a8f6a3e688e9b Mon Sep 17 00:00:00 2001 From: rhatto Date: Mon, 19 Jan 2009 17:05:18 +0000 Subject: fix on repository_import git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@760 04377dda-e619-0410-9926-eae83683ac58 --- trunk/lib/common.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'trunk/lib') diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh index 40306b7..d75c6a3 100644 --- a/trunk/lib/common.sh +++ b/trunk/lib/common.sh @@ -958,7 +958,7 @@ function repository_import { # import a folder into a subversion repository # usage: repository_import - local folder="$1" oldfolder + local folder="$1" oldfolder tmpfile local repository="$2" repository_type repository_path if [ ! -d "$folder" ] || [ -z "$repository" ]; then @@ -996,7 +996,16 @@ function repository_import { fi echo "Importing files from $folder into $repository..." - su_svn import $folder $repository -m "initial import" + if tmpfile=`mktemp $TMP/simplepkg_import.XXXXXX`; then + echo "initial import" > $tmpfile + chmod +r $tmpfile + su_svn import $folder $repository -F $tmpfile + rm -f $tmpfile + else + EXIT_CODE="1" + return $EXIT_CODE + fi + if [ "$?" == "0" ]; then echo "Making $folder a working copy of $repository..." oldfolder="$(mktemp -d $(echo $folder | sed -e 's/\/*$//g').XXXXXX)" -- cgit v1.2.3