Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6123088

Browse files
committed
symlink fincore as mu
Add `mu` as alternate name for fincore. Along the lines of du, which shows disk usage, mu shows memory usage
1 parent 9678fea commit 6123088

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

bash-completion/fincore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ _fincore_module()
4747
return 0
4848
}
4949
complete -F _fincore_module fincore
50+
complete -F _fincore_module mu

meson.build

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3243,8 +3243,11 @@ exe = executable(
32433243
install : true)
32443244
if not is_disabler(exe)
32453245
exes += exe
3246+
meson.add_install_script(meson_make_symlink, 'fincore', usrbin_exec_dir / 'mu')
32463247
manadocs += fincore_manadocs
3248+
manlinks += {'mu.1': 'fincore.1'}
32473249
bashcompletions += ['fincore']
3250+
bashcompletionslinks += {'mu': 'fincore'}
32483251
endif
32493252

32503253
opt = get_option('build-hardlink').allowed()

misc-utils/Makemodule.am

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,16 @@ endif
268268
if BUILD_FINCORE
269269
usrbin_exec_PROGRAMS += fincore
270270
MANPAGES += misc-utils/fincore.1
271+
MANLINKS += misc-utils/mu.1
271272
dist_noinst_DATA += misc-utils/fincore.1.adoc
272273
fincore_SOURCES = misc-utils/fincore.c
273274
fincore_LDADD = $(LDADD) libsmartcols.la libcommon.la
274275
fincore_CFLAGS = $(AM_CFLAGS) -I$(ul_libsmartcols_incdir)
276+
277+
install-exec-hook-fincore:
278+
cd $(DESTDIR)$(usrbin_execdir) && ln -sf fincore mu
279+
280+
INSTALL_EXEC_HOOKS += install-exec-hook-fincore
275281
endif
276282

277283
if BUILD_HARDLINK

misc-utils/fincore.1.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ ifdef::neverdefined[---]
1616

1717
== NAME
1818

19-
fincore - count pages of file contents in core
19+
fincore, mu - count pages of file contents in core
2020

2121
== SYNOPSIS
2222

2323
*fincore* [options] _file_...
24+
*mu* [options] _file_...
2425

2526
== DESCRIPTION
2627

0 commit comments

Comments
 (0)