Skip to content

Commit

Permalink
add -i to gst-load
Browse files Browse the repository at this point in the history
2008-03-11  Paolo Bonzini  <bonzini@gnu.org>

	* scripts/Load.st: Add -i.
	* gst-tool.c: Likewise.
  • Loading branch information
bonzini committed Mar 11, 2008
1 parent dfd82e2 commit 358c1fd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2008-03-11 Paolo Bonzini <bonzini@gnu.org>

* scripts/Load.st: Add -i.
* gst-tool.c: Likewise.

2008-03-10 Paolo Bonzini <bonzini@gnu.org>

* kernel/CharArray.st: Move #startsWith: and #endsWith:...
Expand Down
7 changes: 6 additions & 1 deletion doc/gst.texi
Original file line number Diff line number Diff line change
Expand Up @@ -1912,6 +1912,11 @@ Then it will save the Smalltalk image, and finally exit.
@itemx --image-file
Load the packages inside the given image.

@item -i
@itemx --rebuild-image
Build an image from scratch and load the package into it. Useful
when the image specified with @option{-I} does not exist yet.

@item -q
@itemx --quiet
Hide the script's output.
Expand Down Expand Up @@ -2034,7 +2039,7 @@ To install your package, you only have to do
a @file{.star} archive in the current image directory, with the
files specified in the @code{file} tags. By default the package is
placed in the system-wide package directory; you can use the option
@option{--target-directory} to create the @file{.star} file elsewhere).
@option{--target-directory} to create the @file{.star} file elsewhere.

Alternatively, @code{gst-package} can be used to create a skeleton
GNU style source tree. This includes a @file{configure.ac} that will
Expand Down
10 changes: 8 additions & 2 deletions gst-tool.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,15 @@ struct tool tools[] = {
{
"gst-load", "scripts/Load.st",
"-h|--help --version -q|--quiet -v|-V|--verbose -n|--dry-run -f|--force \
--start:: -t|--test -I|--image-file: --kernel-directory:",
--start:: -t|--test -I|--image-file: --kernel-directory: \
-i|--rebuild-image",
NULL
},
{
"gst-reload", "scripts/Load.st",
"-h|--help --version -q|--quiet -v|-V|--verbose -n|--dry-run -f|--force \
--start:: -t|--test -I|--image-file: --kernel-directory:",
--start:: -t|--test -I|--image-file: --kernel-directory: \
-i|--rebuild-image",
"--force"
},
{
Expand Down Expand Up @@ -257,6 +259,10 @@ parse_option (int short_opt, const char *long_opt, const char *arg)
kernel_dir = arg;
}

if (short_opt == 'i'
|| (long_opt && !strcmp (long_opt, "rebuild-image")))
flags |= GST_REBUILD_IMAGE;

if (long_opt && !strcmp (long_opt, "daemon"))
{
#ifdef HAVE_FORK
Expand Down
3 changes: 2 additions & 1 deletion scripts/Load.st
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Options:
-n --dry-run don''t save the image after loading
-t --test run SUnit tests if available
--start[=ARG] start the package and keep running the image
-i --rebuild-image load into a newly-created image
-I --image-file=FILE load into the specified image
--kernel-dir=PATH use the specified kernel directory
-h --help show this message
Expand All @@ -63,7 +64,7 @@ Options:
Smalltalk
arguments: '-h|--help --version -q|--quiet -v|-V|--verbose -n|--dry-run
-f|--force -t|--test -I|--image-file: --kernel-directory:
--start::'
--start:: -i|--rebuild-image'
do: [ :opt :arg |

opt = 'help' ifTrue: [
Expand Down

0 comments on commit 358c1fd

Please sign in to comment.