diff options
-rw-r--r-- | meson.build | 3 | ||||
-rwxr-xr-x | scripts/x11resdir.sh | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/meson.build b/meson.build index dab8151..a6aa1de 100644 --- a/meson.build +++ b/meson.build @@ -8,6 +8,8 @@ add_global_arguments('-Wno-pointer-sign', language : 'c') config = configuration_data() version = run_command('cat', 'VERSION') config.set_quoted('VERSION', version.stdout().strip()) +x11resrun = run_command('scripts/x11resdir.sh', get_option('prefix')) +x11resdir = x11resrun.stdout().strip() # pkg-config deps freetype_dep = dependency('freetype2') @@ -155,3 +157,4 @@ executable('ida', include_directories : trans_inc, install : true) install_man('man/ida.1') +install_data('Ida.ad', install_dir : x11resdir) diff --git a/scripts/x11resdir.sh b/scripts/x11resdir.sh new file mode 100755 index 0000000..1a00ab8 --- /dev/null +++ b/scripts/x11resdir.sh @@ -0,0 +1,15 @@ +#!/bin/sh +prefix="$1" + +for dir in \ + $prefix/*/X11/app-defaults \ + $prefix/X11R*/*/X11/app-defaults \ + /usr/*/X11/app-defaults \ + /etc/app-defaults \ +; do + if test -d "$dir"; then + echo "$dir" + exit 0 + fi +done +exit 1 |