summaryrefslogtreecommitdiff
path: root/scripts/utils
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2018-08-28 10:24:39 +0200
committerKarel Kočí <karel.koci@nic.cz>2018-08-28 10:24:39 +0200
commit12ae05f4610735d7867712f347a5371844f525c8 (patch)
tree36361ec8760968fa244d9ff44f4599575867f7ec /scripts/utils
parent81157ba2ddbdab2f20ca069f96d020bb40894ae1 (diff)
downloadlaminar-cnf-12ae05f4610735d7867712f347a5371844f525c8.tar.gz
laminar-cnf-12ae05f4610735d7867712f347a5371844f525c8.tar.bz2
laminar-cnf-12ae05f4610735d7867712f347a5371844f525c8.zip
turris4x: preserve precompiled sdk
Diffstat (limited to 'scripts/utils')
-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"
+}