I wish to create tool similar to cnf(command-not-found), but instead of writing it for users, I’m writing it for scripts.
Script only call tool-needed(my shell script), which invoke “which” program for each parameter and if result is different than 0, then add program name to array. When all arguments are processed, my script pass the array to my program in C. The script is completed, I only must wrote program in C.
The program will asks user to install missing programs, but will be written in libgreattao. Libgreattao allows program to works with Gtk+ backend, Qt backend, console backend and in network or shell mode, so I will create universal dialog to ask user to install missing software.
If I had done, then shell scripts could look like that:
#!/bin/bash
tool-needed zcat tar
if $? -eq 1 ]; then
# User don't agree to install one of missing component or some components are not available in repos
exit 1
fi
zcat READTME.gz
tar -xf ./some_program
So, where Can I find libsolv documentation? Can libsolv help me to create tool-needed component?
Sorry for replying too often, but I don’t understand one line. Why we get next line if first three character aren’t ‘deb’? This is the line:
if (strncmp(kp, “deb”, 3) != 0) continue;
Ok. I’m so stupid, I was not realize this is code for debian.