Skip to content

Commit

Permalink
Support @ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
bapt committed Oct 12, 2011
1 parent 3e868fe commit 6f75a8d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libpkg/pkg_ports.c
Expand Up @@ -24,6 +24,7 @@ struct hardlinks {
int
ports_parse_plist(struct pkg *pkg, char *plist)
{
bool ignore_next = false;
char *plist_p, *buf, *p, *plist_buf;
char comment[2];
int nbel, i;
Expand Down Expand Up @@ -74,6 +75,9 @@ ports_parse_plist(struct pkg *pkg, char *plist)
plist_p = plist_buf;

for (i = 0; i <= nbel; i++) {
if (ignore_next)
continue;

if (plist_p[0] == '@') {
if (STARTS_WITH(plist_p, "@cwd")) {
buf = plist_p;
Expand All @@ -87,6 +91,9 @@ ports_parse_plist(struct pkg *pkg, char *plist)
else
prefix = buf;
slash = prefix[strlen(prefix) - 1] == '/' ? "" : "/";
} else if (STARTS_WITH(plist_p, "@ignore")) {
/* ignore the next line */
ignore_next = true;
} else if (STARTS_WITH(plist_p, "@comment ")) {
/* DO NOTHING: ignore the comments */
} else if (STARTS_WITH(plist_p, "@unexec ") ||
Expand Down

0 comments on commit 6f75a8d

Please sign in to comment.