summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/utils19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/utils b/scripts/utils
index fd50dd8..c096f29 100644
--- a/scripts/utils
+++ b/scripts/utils
@@ -5,6 +5,11 @@ echo_stage() {
echo -e "\033[1;34m========== $@ ==========\033[0m"
}
+# Simple echo wrapper for stage marking
+echo_info() {
+ echo -e "\033[1;32m---------- $@ ----------\033[0m"
+}
+
# Fetch bare git repository to WORKSPACE
# First argument has to be a source URL
# Second argument is name of directory to which will be repository cloned to.
@@ -27,3 +32,17 @@ git_fetch() {
[ -n "$BRANCH" ] || BRANCH=master
git --git-dir="$WORKSPACE/$2" --bare worktree add --detach $2 $BRANCH
}
+
+# Lock special lock for this job
+# Extension appended to lock name has to be provided as first argument
+laminar_self_lock() {
+ # TODO trap release
+ laminarc lock "$(basename "$0")-$1"
+}
+
+# Unlock special lock for this job
+# Extension appended to lock name has to be provided as first argument
+laminar_self_unlock() {
+ # TODO remove trap release
+ laminarc unlock "$(basename "$0")-$1"
+}