aboutsummaryrefslogtreecommitdiff
path: root/trunk/lib
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-12-17 16:27:50 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-12-17 16:27:50 +0000
commitb9948b3ae90bc47897071afdbf48f26ef67083a7 (patch)
tree8b909c39534c3e71735a443c5c677220fcc12cfa /trunk/lib
parent535a7ebb86782ad125545d6d2595a619e1ce6ffb (diff)
downloadsimplepkg-b9948b3ae90bc47897071afdbf48f26ef67083a7.tar.gz
simplepkg-b9948b3ae90bc47897071afdbf48f26ef67083a7.tar.bz2
createpkg: package signature; simplaret: enhanced signature checking
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@669 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/lib')
-rw-r--r--trunk/lib/common.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh
index 56b506f..dad6471 100644
--- a/trunk/lib/common.sh
+++ b/trunk/lib/common.sh
@@ -687,7 +687,7 @@ function svn_copy {
fi
# copy file
- if [ "$(cd $(dirname $orig) ; pwd)" != "$(cd $(dirname $dest) ; pwd)" ]; then
+ if is_the_same $orig $(dirname $dest); then
cp $orig/$file $dest
fi
@@ -1318,3 +1318,17 @@ function regexp_slash {
}
+function is_the_same {
+
+ # check if two files are in fact the same
+ # usage: is_the_same <path1> <path2>
+
+ if [ -e "$1" ] && [ -e "$2" ] && \
+ [ "`stat -c '%d' $1`" == "`stat -c '%d' $2`" ] && \
+ [ "`stat -c '%i' $1`" == "`stat -c '%i' $2`" ]; then
+ return 0
+ else
+ return 1
+ fi
+
+}