fix: noconfirm auto-selects first AUR match
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
project('custom install script', 'c')
|
||||
|
||||
# this is just to ensure that the install directory exists before exe is run
|
||||
install_data('file.txt', install_dir: '.')
|
||||
|
||||
subdir('src')
|
||||
|
||||
meson.add_install_script(exe, 'generated.txt')
|
||||
wrap = find_program('wrap.py')
|
||||
# Yes, these are getting silly
|
||||
meson.add_install_script(wrap, exe, 'wrapped.txt')
|
||||
meson.add_install_script(wrap, wrap, exe, 'wrapped2.txt')
|
||||
@@ -0,0 +1,27 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
if (argc != 2) {
|
||||
fprintf(stderr, "Takes exactly 2 arguments\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
char * dirname = getenv("MESON_INSTALL_DESTDIR_PREFIX");
|
||||
char * fullname = malloc(strlen(dirname) + 1 + strlen(argv[1]) + 1);
|
||||
strcpy(fullname, dirname);
|
||||
strcat(fullname, "/");
|
||||
strcat(fullname, argv[1]);
|
||||
|
||||
FILE * fp = fopen(fullname, "w");
|
||||
if (!fp)
|
||||
return 1;
|
||||
|
||||
fputs("Some text\n", fp);
|
||||
fclose(fp);
|
||||
|
||||
free(fullname);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
exe = executable('exe', 'exe.c', install : false, native : true)
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"installed": [
|
||||
{"type": "file", "file": "usr/file.txt"},
|
||||
{"type": "file", "file": "usr/generated.txt"},
|
||||
{"type": "file", "file": "usr/wrapped.txt"},
|
||||
{"type": "file", "file": "usr/wrapped2.txt"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
subprocess.run(sys.argv[1:])
|
||||
Reference in New Issue
Block a user