summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2011-08-02 20:50:18 +0000
committerJason Woodward2011-08-02 20:52:12 +0000
commit598a8bcded03f85cfcc9af78e0b56718a9eb614d (patch)
tree25930fa36534387584879ea744d5a986b05f1c00
parentbdc287d9b0cfa226562e7d31c24e5510b4cee597 (diff)
downloadslapt-src-598a8bcded03f85cfcc9af78e0b56718a9eb614d.tar.gz
--show now recognizes the name:version notation
E.g. slapt-src --show zile:2.3.21
-rw-r--r--ChangeLog3
-rw-r--r--src/main.c11
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f27703c..975414f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
-0.3.2a Jul 15, 2011
+0.3.2a Au 02, 2011
+ * --show now recognizes the name:version notation
* updated --help output (thanks Igor)
0.3.2 Jun 12, 2011
diff --git a/src/main.c b/src/main.c
index 306340a..98854ad 100644
--- a/src/main.c
+++ b/src/main.c
@@ -304,7 +304,15 @@ int main (int argc, char *argv[])
{
int c;
for (i = 0; i < names->count; i++) {
- slapt_src_slackbuild *sb = slapt_src_get_slackbuild (remote_sbs, names->items[i], NULL);
+ slapt_src_slackbuild *sb = NULL;
+ slapt_list_t *parts = slapt_parse_delimited_list (names->items[i], ':');
+ const char *name = parts->items[0];
+ const char *ver = NULL;
+
+ if (parts->count > 1)
+ ver = parts->items[1];
+
+ sb = slapt_src_get_slackbuild (remote_sbs, name, ver);
if (sb != NULL) {
@@ -327,6 +335,7 @@ int main (int argc, char *argv[])
/* slapt_src_slackbuild_free (sb); NO FREE */
}
+ slapt_free_list (parts);
}
}
break;