diff options
author | Karel Kočí <cynerd@email.cz> | 2018-09-01 12:16:01 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2018-09-01 12:18:31 +0200 |
commit | 50162678eb467b16970a3bdeed0a477f08c4025c (patch) | |
tree | ad9ed5fecc2c9c4240b69ebf5c7815a8f9da7ab9 /scripts/utils | |
parent | d2044b1563dd50c6a26927955b767432e57e9865 (diff) | |
download | laminar-cnf-50162678eb467b16970a3bdeed0a477f08c4025c.tar.gz laminar-cnf-50162678eb467b16970a3bdeed0a477f08c4025c.tar.bz2 laminar-cnf-50162678eb467b16970a3bdeed0a477f08c4025c.zip |
Split utils to common and utils
It is beneficial to use utils also in other processes but there were
parts that should only job it self include. This splits those to two
separate files.
Diffstat (limited to 'scripts/utils')
-rw-r--r-- | scripts/utils | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/scripts/utils b/scripts/utils index a955699..8781882 100644 --- a/scripts/utils +++ b/scripts/utils @@ -1,6 +1,7 @@ # vim: ft=sh +[ -n "$LAMINAR_COMMON" ] # variables definition guard -if [ "$V" -ge 2 ]; then +if [ "$V" -ge 3 ]; then set -x fi @@ -19,21 +20,6 @@ echo_fail() { return 1 } -## Job and template IDs ######################################################### -# Returns current job's id -jobid() { - basename "$0" | sed 's/\.run$//' -} - -# Return current template's id -# If this is not template then this returns job's id -templateid() { - basename "$(readlink -f "$0")" | sed 's/\.run$//' -} - -TWORKSPACE="$HOME/workspace/$(templateid)" -[ "$(jobid)" != "$(templateid)" ] || TWORKSPACE="$HOME/workspace/notemplate" - ## GIT ########################################################################## # Fetch bare git repository # First argument has to be a source URL |