mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-20 10:13:01 +01:00
Support new sources format within the lb environment
This commit is contained in:
parent
617b516f1f
commit
9d08d181f0
6 changed files with 34 additions and 29 deletions
|
|
@ -11,7 +11,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#define MAX_STRING 4096
|
||||
#define MAX_TOKENS 3
|
||||
#define MAX_TOKENS 8
|
||||
|
||||
char *get_distfiles(char **envp) {
|
||||
char *envvar = "DISTFILES=";
|
||||
|
|
@ -60,12 +60,15 @@ int main(int argc, char **argv, char **envp) {
|
|||
}
|
||||
line = strchr(line, '\n');
|
||||
line[0] = '\0';
|
||||
// Only "file" type of distfile supported at this point
|
||||
require(strcmp(tokens[0], "f") == 0 || strcmp(tokens[0], "file") == 0,
|
||||
"Only support file distfile type at this point");
|
||||
// Get checksum and filename
|
||||
checksum = tokens[1];
|
||||
if (tokens[2] != NULL) {
|
||||
filename = tokens[2];
|
||||
checksum = tokens[2];
|
||||
if (tokens[3] != NULL) {
|
||||
filename = tokens[3];
|
||||
} else {
|
||||
filename = strrchr(tokens[0], '/');
|
||||
filename = strrchr(tokens[1], '/');
|
||||
filename += 1;
|
||||
}
|
||||
// Put it all together
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue