This website works better with JavaScript.
Home
Explore
Help
Sign In
er1n
/
i3lock
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
print version number when invoked with -v
master
Michael Stapelberg
15 years ago
parent
5d43c20538
commit
efde6a170d
2 changed files
with
3 additions
and
1 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-0
Makefile
+1
-1
i3lock.c
+ 2
- 0
Makefile
View File
@ -18,6 +18,8 @@ FILES:=$(wildcard *.c)
FILES
:=
$(
FILES:.c
=
.o
)
FILES
:=
$(
FILES:.c
=
.o
)
VERSION
:=
$(
shell git describe --tags --abbrev
=
0
)
VERSION
:=
$(
shell git describe --tags --abbrev
=
0
)
GIT_VERSION
:=
"
$(
shell git describe --tags --always
)
(
$(
shell git log --pretty
=
format:%cd --date
=
short -n1
)
)
"
CFLAGS
+=
-DVERSION
=
\"
${
GIT_VERSION
}
\"
.PHONY
:
install
clean
uninstall
.PHONY
:
install
clean
uninstall
+ 1
- 1
i3lock.c
View File
@ -267,7 +267,7 @@ int main(int argc, char *argv[]) {
while
(
(
o
=
getopt_long
(
argc
,
argv
,
"
vnbdi:c:tp:
"
,
longopts
,
&
optind
)
)
!
=
-
1
)
{
while
(
(
o
=
getopt_long
(
argc
,
argv
,
"
vnbdi:c:tp:
"
,
longopts
,
&
optind
)
)
!
=
-
1
)
{
switch
(
o
)
{
switch
(
o
)
{
case
'
v
'
:
case
'
v
'
:
errx
(
EXIT_SUCCESS
,
"
i3lock
© 2010 Michael Stapelberg
\n
"
)
;
errx
(
EXIT_SUCCESS
,
"
version
"
VERSION
"
© 2010 Michael Stapelberg
\n
"
)
;
case
'
n
'
:
case
'
n
'
:
dont_fork
=
true
;
dont_fork
=
true
;
break
;
break
;
Write
Preview
Loading…
Cancel
Save