Skip to content

Commit 3d8b2a0

Browse files
authored
Merge pull request #171 from budlabs/next
[FIX] build process typo `@$ -> $@`
2 parents 4180f06 + fdaa000 commit 3d8b2a0

File tree

17 files changed

+121
-90
lines changed

17 files changed

+121
-90
lines changed

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,16 @@ See the [last releasenote](docs/releasenotes/0next.md).
3232
### usage
3333

3434
The table below lists the included commands. The
35-
links go to the **wiki** page of each commands.
35+
links go to the **[wiki]** page of each commands.
3636
There is also a lot of videos on the budlabs [youtube channel],
3737
where i3ass is used and explained.
3838

39+
In the **[wiki]** there are also two examples on how
40+
i3's config file can be configured to make use
41+
of most of **i3ass**.
42+
(<https://github.com/budlabs/i3ass/wiki/i3-config-example>)
43+
44+
3945
script | description
4046
|:-|:-|
4147
[i3flip] | Tabswitching done right

docs/readme_about.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ See the [last releasenote](docs/releasenotes/0next.md).
66
### usage
77

88
The table below lists the included commands. The
9-
links go to the **wiki** page of each commands.
9+
links go to the **[wiki]** page of each commands.
1010
There is also a lot of videos on the budlabs [youtube channel],
1111
where i3ass is used and explained.
12+
13+
In the **[wiki]** there are also two examples on how
14+
i3's config file can be configured to make use
15+
of most of **i3ass**.
16+
(<https://github.com/budlabs/i3ass/wiki/i3-config-example>)
17+

docs/releasenotes/0next.md

+6-15
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
1-
## next
1+
### 2022.05.21
22

3-
### bashbud
3+
#### bashbud
44

5-
Many improvements to the build steps.
6-
Manpages are included so no need for manpage generator
7-
as dependency.
5+
fixed issue reported in #170, that made all scripts
6+
broken (tried to start main() passing `@$` instead of `$@`).
87

9-
### [i3list]
10-
NEW KEY: `i3list[SUS]`
11-
contains the number of containers matching all criteria
12-
13-
### [i3run]
14-
When xdotool is used to rename a window class/instance
15-
the window gets a new `container_id`, and now that
16-
new id is reported instead of the old.
17-
18-
don't use eval when executing commands.
8+
Fixed issue that made all programs look like they
9+
where updated on the installation data.

docs/releasenotes/2022.05.20.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
### 2022.05.20
2+
3+
#### bashbud
4+
5+
Many improvements to the build steps.
6+
Manpages are included so no need for manpage generator
7+
as dependency.
8+
9+
#### [i3list]
10+
NEW KEY: `i3list[SUS]`
11+
contains the number of containers matching all criteria
12+
13+
#### [i3run]
14+
When xdotool is used to rename a window class/instance
15+
the window gets a new `container_id`, and now that
16+
new id is reported instead of the old.
17+
18+
don't use eval when executing commands.

share/Makefile

+71-73
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,26 @@ MANPAGE_OUT = _$(MANPAGE)
3333
FUNC_STYLE := "() {"
3434

3535
ifneq ($(wildcard config.mak),)
36-
include config.mak
36+
include config.mak
3737
endif
3838

3939
manpage_section = $(subst .,,$(suffix $(MANPAGE)))
4040
function_createconf := $(FUNCS_DIR)/_createconf.sh
4141
function_awklib := $(FUNCS_DIR)/_awklib.sh
4242

4343
ifneq ($(wildcard $(CONF_DIR)/*),)
44-
include_createconf = $(function_createconf)
45-
conf_dirs = $(shell find $(CONF_DIR) -type d)
46-
conf_files = $(shell find $(CONF_DIR) -type f)
44+
include_createconf = $(function_createconf)
45+
conf_dirs = $(shell find $(CONF_DIR) -type d)
46+
conf_files = $(shell find $(CONF_DIR) -type f)
4747
else
48-
$(shell rm -f $(function_createconf))
48+
$(shell rm -f $(function_createconf))
4949
endif
5050

5151
ifneq ($(wildcard $(AWK_DIR)/*),)
52-
53-
include_awklib = $(function_awklib)
54-
awk_files = $(wildcard $(AWK_DIR)/*)
52+
include_awklib = $(function_awklib)
53+
awk_files = $(wildcard $(AWK_DIR)/*)
5554
else
56-
$(shell rm -f $(function_awklib))
55+
$(shell rm -f $(function_awklib))
5756
endif
5857

5958
option_docs = $(wildcard $(DOCS_DIR)/options/*)
@@ -70,21 +69,23 @@ function_files := \
7069
# this is needed for _init.sh (BASE) to know it needs
7170
# to be rebuilt on this event.
7271

73-
ifeq ($(wildcard $(CACHE_DIR)/got_func),)
74-
$(shell mkdir -p $(CACHE_DIR)/options)
75-
$(shell echo 0 > $(CACHE_DIR)/got_func)
76-
endif
77-
78-
ifneq ($(wildcard $(FUNCS_DIR)/*),)
79-
ifneq ($(file < $(CACHE_DIR)/got_func), 1)
80-
$(shell echo 1 > $(CACHE_DIR)/got_func)
81-
endif
82-
else
83-
ifneq ($(file < $(CACHE_DIR)/got_func), 0)
84-
$(shell echo 0 > $(CACHE_DIR)/got_func)
72+
ifneq ($(wildcard $(CACHE_DIR)/got_func),)
73+
ifneq ($(wildcard $(FUNCS_DIR)/*),)
74+
ifneq ($(file < $(CACHE_DIR)/got_func), 1)
75+
$(shell echo 1 > $(CACHE_DIR)/got_func)
76+
endif
77+
else
78+
ifneq ($(file < $(CACHE_DIR)/got_func), 0)
79+
$(shell echo 0 > $(CACHE_DIR)/got_func)
80+
endif
8581
endif
8682
endif
8783

84+
$(CACHE_DIR)/got_func: | $(CACHE_DIR)/
85+
@$(info making $@)
86+
[[ -d $${tmp:=$(FUNCS_DIR)} ]] && tmp=1 || tmp=0
87+
echo $$tmp > $@
88+
8889
clean:
8990
rm -rf $(wildcard _*) $(CACHE_DIR) $(generated_functions)
9091

@@ -135,7 +136,7 @@ $(MONOLITH): $(CACHE_DIR)/print_version.sh $(NAME) $(CACHE_DIR)/print_help.sh $(
135136
grep -vhE -e '^#!/' -e '#bashbud$$' $$f
136137
done
137138

138-
printf '%s\n' '' 'main "@$$"'
139+
printf '%s\n' '' 'main "$$@"'
139140
} > $@
140141

141142
chmod +x $@
@@ -192,25 +193,43 @@ $(CACHE_DIR)/help_table.txt: $(CACHE_DIR)/long_help.md
192193
paste <(echo "$$frag") <(echo "$$desc") | tr -d '\t'
193194
done > $@
194195

195-
$(function_awklib): $(awk_files) | $(FUNCS_DIR)/
196+
$(CACHE_DIR)/:
197+
@$(info creating $(CACHE_DIR)/ dir)
198+
mkdir -p $(CACHE_DIR) $(CACHE_DIR)/options
199+
200+
$(FUNCS_DIR)/:
201+
@$(info creating $(FUNCS_DIR)/ dir)
202+
mkdir -p $(FUNCS_DIR)
203+
204+
$(CACHE_DIR)/print_version.sh: config.mak | $(CACHE_DIR)/
196205
@$(info making $@)
197-
{
198-
printf '%s\n' \
199-
'$(SHBANG)' \
200-
'' \
201-
'### _awklib() function is automatically generated' \
202-
'### from makefile based on the content of the $(AWK_DIR)/ directory' \
203-
''
206+
echo $(SHBANG)
207+
fstyle=$(FUNC_STYLE)
208+
printf "__print_version$${fstyle}\n" > $@
209+
printf '%s\n' \
210+
"$(INDENT)>&2 printf '%s\n' \\" \
211+
"$(INDENT)$(INDENT)'$(NAME) - version: $(VERSION)' \\" \
212+
"$(INDENT)$(INDENT)'updated: $(UPDATED) by $(AUTHOR)'" \
213+
"}" \
214+
"" >> $@
204215

216+
$(CACHE_DIR)/print_help.sh: $(CACHE_DIR)/help_table.txt $(CACHE_DIR)/synopsis.txt
217+
@$(info making $@)
218+
{
219+
echo $(SHBANG)
205220
fstyle=$(FUNC_STYLE)
206-
printf "_awklib$${fstyle}\n"
207-
printf '%s\n' \
208-
'[[ -d $$__dir ]] && { cat "$$__dir/$(AWK_DIR)/"* ; return ;} #bashbud' \
209-
"cat << 'EOAWK'"
210-
cat $(awk_files)
211-
printf '%s\n' "EOAWK" '}'
221+
printf "__print_help$${fstyle}\n"
222+
echo "$(INDENT)cat << 'EOB' >&2 "
223+
if [[ options = "$(USAGE)" ]]; then
224+
cat $(CACHE_DIR)/synopsis.txt
225+
echo
226+
else
227+
printf '%s\n' 'usage: $(USAGE)' ''
228+
echo
229+
fi
230+
cat $(CACHE_DIR)/help_table.txt
231+
printf '%s\n' 'EOB' '}'
212232
} > $@
213-
214233

215234
$(function_createconf): $(conf_files) | $(FUNCS_DIR)/
216235
@$(info making $@)
@@ -245,46 +264,25 @@ $(function_createconf): $(conf_files) | $(FUNCS_DIR)/
245264
echo '}'
246265
} > $@
247266

248-
$(CACHE_DIR)/:
249-
@$(info creating $(CACHE_DIR)/ dir)
250-
mkdir -p $(CACHE_DIR) $(CACHE_DIR)/options
251-
[[ -d $(FUNCS_DIR) ]] \
252-
&& echo 1 > $(CACHE_DIR)/got_func \
253-
|| echo 0 > $(CACHE_DIR)/got_func
254-
255-
$(FUNCS_DIR)/:
256-
@$(info creating $(FUNCS_DIR)/ dir)
257-
mkdir -p $(FUNCS_DIR)
258-
259-
$(CACHE_DIR)/print_version.sh: config.mak | $(CACHE_DIR)/
260-
@$(info making $@)
261-
echo $(SHBANG)
262-
fstyle=$(FUNC_STYLE)
263-
printf "__print_version$${fstyle}\n" > $@
264-
printf '%s\n' \
265-
"$(INDENT)>&2 printf '%s\n' \\" \
266-
"$(INDENT)$(INDENT)'$(NAME) - version: $(VERSION)' \\" \
267-
"$(INDENT)$(INDENT)'updated: $(UPDATED) by $(AUTHOR)'" \
268-
"}" \
269-
"" >> $@
270-
271-
$(CACHE_DIR)/print_help.sh: $(CACHE_DIR)/help_table.txt $(CACHE_DIR)/synopsis.txt
267+
$(function_awklib): $(awk_files) | $(FUNCS_DIR)/
272268
@$(info making $@)
273269
{
274-
echo $(SHBANG)
270+
printf '%s\n' \
271+
'$(SHBANG)' \
272+
'' \
273+
'### _awklib() function is automatically generated' \
274+
'### from makefile based on the content of the $(AWK_DIR)/ directory' \
275+
''
276+
275277
fstyle=$(FUNC_STYLE)
276-
printf "__print_help$${fstyle}\n"
277-
echo "$(INDENT)cat << 'EOB' >&2 "
278-
if [[ options = "$(USAGE)" ]]; then
279-
cat $(CACHE_DIR)/synopsis.txt
280-
echo
281-
else
282-
printf '%s\n' 'usage: $(USAGE)' ''
283-
echo
284-
fi
285-
cat $(CACHE_DIR)/help_table.txt
286-
printf '%s\n' 'EOB' '}'
278+
printf "_awklib$${fstyle}\n"
279+
printf '%s\n' \
280+
'[[ -d $$__dir ]] && { cat "$$__dir/$(AWK_DIR)/"* ; return ;} #bashbud' \
281+
"cat << 'EOAWK'"
282+
cat $(awk_files)
283+
printf '%s\n' "EOAWK" '}'
287284
} > $@
285+
288286
$(CACHE_DIR)/options_in_use $(CACHE_DIR)/getopt &: $(OPTIONS_FILE) | $(CACHE_DIR)/
289287
@$(info parsing $(OPTIONS_FILE))
290288
mkdir -p $(DOCS_DIR)/options

src/i3Kornhe/config.mak

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
NAME := i3Kornhe
22
VERSION := 0.669
33
CREATED := 2017-12-12
4+
UPDATED := 2022-05-21
45
AUTHOR := budRich
56
CONTACT := https://github.com/budlabs/i3ass
67
USAGE := options

src/i3flip/config.mak

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
NAME := i3flip
22
VERSION := 0.101
33
CREATED := 2018-01-03
4+
UPDATED := 2022-05-21
45
AUTHOR := budRich
56
CONTACT := https://github.com/budlabs/i3ass
67
USAGE := i3flip [--move|-m] DIRECTION

src/i3fyra/config.mak

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
NAME := i3fyra
22
VERSION := 1.25
33
CREATED := 2017-01-14
4+
UPDATED := 2022-05-21
45
AUTHOR := budRich
56
CONTACT := https://github.com/budlabs/i3ass
67
USAGE := options

src/i3get/config.mak

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
NAME := i3get
22
VERSION := 0.8
33
CREATED := 2017-03-08
4+
UPDATED := 2022-05-21
45
AUTHOR := budRich
56
CONTACT := https://github.com/budlabs/i3ass
67
USAGE := i3get [OPTIONS]

src/i3gw/config.mak

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
NAME := i3gw
22
VERSION := 0.999
33
CREATED := 2017-01-11
4+
UPDATED := 2022-05-21
45
AUTHOR := budRich
56
CONTACT := https://github.com/budlabs/i3ass
67
USAGE := i3gw MARK

src/i3king/config.mak

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
NAME := i3king
22
VERSION := 0.33
33
CREATED := 2021-06-01
4+
UPDATED := 2022-05-21
45
AUTHOR := budRich
56
CONTACT := https://github.com/budlabs/i3ass
67
USAGE := i3king [OPTIONS]

src/i3list/config.mak

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
NAME := i3list
22
VERSION := 0.51
33
CREATED := 2017-10-06
4+
UPDATED := 2022-05-21
45
AUTHOR := budRich
56
CONTACT := https://github.com/budlabs/i3ass
67
USAGE := options

src/i3menu/config.mak

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
NAME := i3menu
22
VERSION := 0.11
33
CREATED := 2018-07-21
4+
UPDATED := 2022-05-21
45
AUTHOR := budRich
56
CONTACT := https://github.com/budlabs/i3ass
67
USAGE := i3menu [OPTIONS]

src/i3run/config.mak

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
NAME := i3run
22
VERSION := 0.2
33
CREATED := 2017-04-20
4+
UPDATED := 2022-05-21
45
AUTHOR := budRich
56
CONTACT := https://github.com/budlabs/i3ass
67
USAGE := options

src/i3var/config.mak

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
NAME := i3var
22
VERSION := 0.050
33
CREATED := 2017-12-22
4+
UPDATED := 2022-05-21
45
AUTHOR := budRich
56
CONTACT := https://github.com/budlabs/i3ass
67
USAGE := options

src/i3viswiz/config.mak

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
NAME := i3viswiz
22
VERSION := 0.55
33
CREATED := 2018-01-18
4+
UPDATED := 2022-05-21
45
AUTHOR := budRich
56
CONTACT := https://github.com/budlabs/i3ass
67
USAGE := options

src/i3zen/config.mak

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
NAME := i3zen
22
VERSION := 0.1
33
CREATED := 2017-09-11
4+
UPDATED := 2022-05-21
45
AUTHOR := budRich
56
CONTACT := https://github.com/budlabs/i3ass
67
USAGE := $(NAME) [OPTIONS]

0 commit comments

Comments
 (0)