Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
2e0ef31d
Commit
2e0ef31d
authored
Aug 05, 2008
by
dinesh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commiting create_dep_tar uses get_deps as of now
parent
338b91f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
3 deletions
+50
-3
tools/Makefile
tools/Makefile
+5
-3
tools/create_dep_tar.c
tools/create_dep_tar.c
+45
-0
No files found.
tools/Makefile
View file @
2e0ef31d
tools/ccan_depends
:
tools/ccan_depends.o tools/depends.o ccan/string/string.o ccan/talloc/talloc.o ccan/noerr/noerr.o
tools/ccan_depends
:
tools/ccan_depends.o tools/depends.o ccan/string/string.o ccan/talloc/talloc.o ccan/noerr/noerr.o
tools/run_tests
:
tools/run_tests.o tools/depends.o ccan/tap/tap.o ccan/string/string.o ccan/talloc/talloc.o
tools/run_tests
:
tools/run_tests.o tools/depends.o ccan/tap/tap.o ccan/string/string.o ccan/
noerr/noerr.o ccan/
talloc/talloc.o
tools/doc_extract
:
tools/doc_extract.o ccan/string/string.o ccan/talloc/talloc.o
tools/doc_extract
:
tools/doc_extract.o ccan/string/string.o ccan/
noerr/noerr.o ccan/
talloc/talloc.o
tools/namespacize
:
tools/namespacize.o tools/depends.o ccan/string/string.o ccan/talloc/talloc.o
tools/namespacize
:
tools/namespacize.o tools/depends.o ccan/string/string.o ccan/noerr/noerr.o ccan/talloc/talloc.o
tools/create_dep_tar
:
tools/create_dep_tar.o tools/depends.o ccan/string/string.o ccan/noerr/noerr.o ccan/talloc/talloc.o
tools/run_tests.o tools/namespacize.o tools/depends.o
:
tools/tools.h
tools/run_tests.o tools/namespacize.o tools/depends.o
:
tools/tools.h
...
...
tools/create_dep_tar.c
0 → 100644
View file @
2e0ef31d
#include "tools.h"
#include <err.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "ccan/string/string.h"
#include "ccan/talloc/talloc.h"
#define TAR_CMD "tar cvvf "
static
void
create_tar
(
char
**
deps
,
const
char
*
dir
)
{
FILE
*
p
;
char
*
cmd_args
,
*
cmd
,
*
module
,
*
buffer
;
/* getting module name*/
module
=
strrchr
(
dir
,
'/'
);
module
++
;
cmd_args
=
strjoin
(
NULL
,
deps
,
" "
);
cmd
=
talloc_asprintf
(
NULL
,
TAR_CMD
"%s/%s_dep.tar %s"
,
dir
,
module
,
cmd_args
);
p
=
popen
(
cmd
,
"r"
);
if
(
!
p
)
err
(
1
,
"Executing '%s'"
,
cmd
);
buffer
=
grab_fd
(
NULL
,
fileno
(
p
));
if
(
!
buffer
)
err
(
1
,
"Reading from '%s'"
,
cmd
);
pclose
(
p
);
}
int
main
(
int
argc
,
char
*
argv
[])
{
char
**
deps
;
if
(
argc
!=
2
)
errx
(
1
,
"Usage: create_dep_tar <dir>
\n
"
"Create tar of all the ccan dependencies"
);
deps
=
get_deps
(
NULL
,
argv
[
1
]);
if
(
deps
!=
NULL
)
create_tar
(
deps
,
argv
[
1
]);
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment