Skip to content

Commit 4a66677

Browse files
committed
* set-force directive
1 parent 74c76ad commit 4a66677

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

dist/autark.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define CONFIG_H
33

44
#define META_VERSION "0.9.0"
5-
#define META_REVISION "abe2739"
5+
#define META_REVISION "74c76ad"
66

77
#endif
88
#define _AMALGAMATE_
@@ -3841,8 +3841,12 @@ static struct unit* _unit_for_set(struct node *n, struct node *nn, const char **
38413841

38423842
static void _set_init(struct node *n);
38433843

3844+
static bool _set_is_force(struct node *n) {
3845+
return strcmp(n->value, "set-force") == 0;
3846+
}
3847+
38443848
static void _set_setup(struct node *n) {
3845-
if (!n->init) {
3849+
if (_set_is_force(n)) {
38463850
_set_init(n);
38473851
}
38483852
if (n->child && strcmp(n->value, "env") == 0) {
@@ -3874,10 +3878,6 @@ static void _set_init(struct node *n) {
38743878
unit_env_set_node(unit, key, n);
38753879
}
38763880

3877-
static bool _set_is_force(struct node *n) {
3878-
return strcmp(n->value, "set-force") == 0;
3879-
}
3880-
38813881
static const char* _set_value_get(struct node *n) {
38823882
if (n->recur_next.active && n->recur_next.n) {
38833883
return _set_value_get(n->recur_next.n);

dist/build.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# https://github.com/Softmotions/autark
77

88
META_VERSION=0.9.0
9-
META_REVISION=abe2739
9+
META_REVISION=74c76ad
1010
cd "$(cd "$(dirname "$0")"; pwd -P)"
1111

1212
prev_arg=""
@@ -62,7 +62,7 @@ cat <<'a292effa503b' > ${AUTARK_HOME}/autark.c
6262
#ifndef CONFIG_H
6363
#define CONFIG_H
6464
#define META_VERSION "0.9.0"
65-
#define META_REVISION "abe2739"
65+
#define META_REVISION "74c76ad"
6666
#endif
6767
#define _AMALGAMATE_
6868
#define _XOPEN_SOURCE 700
@@ -3299,8 +3299,11 @@ static struct unit* _unit_for_set(struct node *n, struct node *nn, const char **
32993299
return unit_peek();
33003300
}
33013301
static void _set_init(struct node *n);
3302+
static bool _set_is_force(struct node *n) {
3303+
return strcmp(n->value, "set-force") == 0;
3304+
}
33023305
static void _set_setup(struct node *n) {
3303-
if (!n->init) {
3306+
if (_set_is_force(n)) {
33043307
_set_init(n);
33053308
}
33063309
if (n->child && strcmp(n->value, "env") == 0) {
@@ -3330,9 +3333,6 @@ static void _set_init(struct node *n) {
33303333
}
33313334
unit_env_set_node(unit, key, n);
33323335
}
3333-
static bool _set_is_force(struct node *n) {
3334-
return strcmp(n->value, "set-force") == 0;
3335-
}
33363336
static const char* _set_value_get(struct node *n) {
33373337
if (n->recur_next.active && n->recur_next.n) {
33383338
return _set_value_get(n->recur_next.n);

node_set.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ static struct unit* _unit_for_set(struct node *n, struct node *nn, const char **
2525

2626
static void _set_init(struct node *n);
2727

28+
static bool _set_is_force(struct node *n) {
29+
return strcmp(n->value, "set-force") == 0;
30+
}
31+
2832
static void _set_setup(struct node *n) {
29-
if (!n->init) {
33+
if (_set_is_force(n)) {
3034
_set_init(n);
3135
}
3236
if (n->child && strcmp(n->value, "env") == 0) {
@@ -58,10 +62,6 @@ static void _set_init(struct node *n) {
5862
unit_env_set_node(unit, key, n);
5963
}
6064

61-
static bool _set_is_force(struct node *n) {
62-
return strcmp(n->value, "set-force") == 0;
63-
}
64-
6565
static const char* _set_value_get(struct node *n) {
6666
if (n->recur_next.active && n->recur_next.n) {
6767
return _set_value_get(n->recur_next.n);

0 commit comments

Comments
 (0)