aboutsummaryrefslogtreecommitdiff
path: root/trunk/lib
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-02-11 22:07:34 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-02-11 22:07:34 +0000
commit50570901c1743d507dd4ca347b161786cab608f0 (patch)
tree7215b09cd71c05c14bde594ef499a522a0c94812 /trunk/lib
parentc6df3969c725f6a102a0d4ae9d8a7265eba48c85 (diff)
downloadsimplepkg-50570901c1743d507dd4ca347b161786cab608f0.tar.gz
simplepkg-50570901c1743d507dd4ca347b161786cab608f0.tar.bz2
templatepkg: now -c is different from -u
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@186 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/lib')
-rw-r--r--trunk/lib/common.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh
index 5785223..952f25d 100644
--- a/trunk/lib/common.sh
+++ b/trunk/lib/common.sh
@@ -447,3 +447,36 @@ function set_jail_perms {
}
+function use_svn {
+
+ # check if svn usage is enabled
+
+ if [ "$TEMPLATES_UNDER_SVN" == "1" ] && \
+ [ "$TEMPLATE_STORAGE_STYLE" == "own-folder" ]; then
+ return 0
+ else
+ return 1
+ fi
+
+}
+
+function svn_check {
+
+ # check if a file is under svn
+ # usage: svn_check <file>
+
+ local cwd
+
+ cwd="`pwd`"
+ cd `dirname $1`
+
+ if [ "`svn status $1 | awk '{ print $1 }'`" == "?" ]; then
+ return 1
+ else
+ return 0
+ fi
+
+ cd $cwd
+
+}
+