Correction mécanisme valuer par défaut tamarin_db get
This commit is contained in:
parent
95afc85772
commit
7a89eab56e
@ -21,7 +21,7 @@ function tamarin_load_project_db {
|
||||
|
||||
function tamarin_db_get {
|
||||
local opt_name=${KEY_PREFIX}${1}
|
||||
local default_value=${2}
|
||||
local default_value=${@:2}
|
||||
touch "${GLOBAL_DB_FILE}"
|
||||
source "${GLOBAL_DB_FILE}"
|
||||
echo ${!opt_name:-${default_value}}
|
||||
@ -29,7 +29,7 @@ function tamarin_db_get {
|
||||
|
||||
function tamarin_db_set {
|
||||
local opt_name=${1}
|
||||
local opt_value=${2}
|
||||
local opt_value=${@:2}
|
||||
mkdir -p "$(dirname ${GLOBAL_DB_FILE})"
|
||||
touch "${GLOBAL_DB_FILE}"
|
||||
sed -i "s/^${KEY_PREFIX}${opt_name}*$//" "${GLOBAL_DB_FILE}"
|
||||
|
Loading…
Reference in New Issue
Block a user