BashDiff - Bash extended.
BashDiff - Bash extended.
Have a look at bashdiff http://freshmeat.net/projects/bashdiff/
I've complied it (I added a patch provided by William) and it works great in Puppy
It adds just about 10K to the original bash but greatly extends the power of bash scripting:
- String handling (strcat, strcpy, strlen, strcmp)
- Array handling
- XML parsing: (expat)
- error checking (try-block)
- Calculations (HP syle rpn calculator)
- GTK UI generation (Way better and cleaner than gtkdialog)
Plus many more features
Once I'm done readying XDG menus package and the network wizard for 1.0.9 I will prepare a package with it... or why wait, just because I'm at the office now and not in linux does not mean that I cannot upload it:
I've complied it (I added a patch provided by William) and it works great in Puppy
It adds just about 10K to the original bash but greatly extends the power of bash scripting:
- String handling (strcat, strcpy, strlen, strcmp)
- Array handling
- XML parsing: (expat)
- error checking (try-block)
- Calculations (HP syle rpn calculator)
- GTK UI generation (Way better and cleaner than gtkdialog)
Plus many more features
Once I'm done readying XDG menus package and the network wizard for 1.0.9 I will prepare a package with it... or why wait, just because I'm at the office now and not in linux does not mean that I cannot upload it:
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to
wow, looks promising.
I currently do some coding in C (Gtk), and think of releasing some widgets in the next days, that can be used in scripts.
Like that one for example:
http://dotpups.de/pics/puppy/dbsetter.jpg
So if someone has a special wish...
Mark
I currently do some coding in C (Gtk), and think of releasing some widgets in the next days, that can be used in scripts.
Like that one for example:
http://dotpups.de/pics/puppy/dbsetter.jpg
So if someone has a special wish...
Mark
Hi Barry,
Yes, pretty impresive. The developer is member of my local LUG and as soon as he made a presentation I was hooked. I've been testing it since.
Please beware of the following email exchange with William:
I had to apply the patch manually (manually inserting the required lines) as the patch as is would not work for me.
Please also note that I disabled all the libraries that don't nativelly come on the LiveCD.
Yes, pretty impresive. The developer is member of my local LUG and as soon as he made a presentation I was hooked. I've been testing it since.
Please beware of the following email exchange with William:
I had to apply the patch manually (manually inserting the required lines) as the patch as is would not work for me.
Please also note that I disabled all the libraries that don't nativelly come on the LiveCD.
> I'm having a problem using it.
>
> The problem is that whenever I enter a command it
> cannot find, it tells me that, but does not return to
> the command line, I must close the console window.
>
> I've compiled bash+william according to William's page
> and using the following configure:
>
> ./configure --disable-postgresql --disable-mysql
> --disable-sqlite --disable-gdbm --disable-libwebserver
>
> It compiled OK, and I can use the new shell with the
> basic functionality.
>
> Have you experienced this problem?
It's not my doing. Glibc is the culprit. You'll see the same
behaviour with the stock Bash, without my patch. It works here with
- gcc-3.3.6
- glibc-2.3.5
If you have older version, then here is patch which Slackware distro
applied...
Code: Select all
--- jobs.c.orig 2005-09-10 12:40:49.000000000 -0700 +++ jobs.c 2005-09-10 12:41:13.000000000 -0700 @@ -2476,6 +2476,7 @@ PROCESS *child; pid_t pid; int call_set_current, last_stopped_job, job, children_exited, waitpid_flags; + static int wcontinued_not_supported = 0; call_set_current = children_exited = 0; last_stopped_job = NO_JOB; @@ -2489,7 +2490,15 @@ : 0; if (sigchld || block == 0) waitpid_flags |= WNOHANG; + retry: + if (wcontinued_not_supported) + waitpid_flags &= ~WCONTINUED; pid = WAITPID (-1, &status, waitpid_flags); + if (errno == EINVAL) + { + wcontinued_not_supported = 1; + goto retry; + } /* The check for WNOHANG is to make sure we decrement sigchld only if it was non-zero before we called waitpid. */
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to
Oh, I almost forget to mention.
The version I uploaded also has the following patch I sent to William. The code is so clean that It was a breeze to figure it out.
The patch is to allow images on the buttons by adding an "image" attribute to the <button> tag:
William has also identified the following bug
The version I uploaded also has the following patch I sent to William. The code is so clean that It was a breeze to figure it out.
The patch is to allow images on the buttons by adding an "image" attribute to the <button> tag:
Code: Select all
==============================
--- gtk.orig.c 2006-04-11 00:32:57.000000000 -0500
+++ gtk.c 2006-04-11 00:21:13.000000000 -0500
@@ -749,6 +749,9 @@
if (STREQ (a, "label")) {
gtk_button_set_label (GTK_BUTTON (w),(gchar *)b);
}
+ else if (STREQ (a, "image")) {
+ gtk_button_set_image (GTK_BUTTON (w),gtk_image_new_from_file((gchar *)b));
+ }
else if (STREQ (a, "stock")) {
gtk_button_set_label (GTK_BUTTON (w),(gchar *)b);
gtk_button_set_use_stock (GTK_BUTTON(w), TRUE);
William Park wrote:> Thanks for the feedback!
>
> I just found a typo, which will result in segfault.
> Try
>
> ( a=123456789; echo ${a|>2}; )
>
> and you'll see either strange character at the end,
> or segmentation
> fault. It's returning unterminated string. Other
> than that, everything
> should work.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to
I talked to William Park and he was quite pleased that bashdiff is in Puppy.
He has some nice improvements planned for the next version.
On top of that, he already included my patch for the image buttons on the GTK extension.
He has some nice improvements planned for the next version.
On top of that, he already included my patch for the image buttons on the GTK extension.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to
Nathan,
Please notice that Puppy2 already comes with bash-diff as the default shell.
It does not enable the expat or gtk but it's easy to enable (no recompiling needed).
Please notice that Puppy2 already comes with bash-diff as the default shell.
It does not enable the expat or gtk but it's easy to enable (no recompiling needed).
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to
I'll extract the relevant information form William's page.
I will basically remove anything unrelated to bash-diff and write the commands based on puppy's file structure.
I will basically remove anything unrelated to bash-diff and write the commands based on puppy's file structure.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
Wiki page created - relevant info to add? I will leave to you guys . . .
http://puppylinux.org/wikka/BashDiff
http://puppylinux.org/wikka/BashDiff
Barry,BarryK wrote:rarsa,
A web page or wiki page "How to use Bash-diff in Puppy Linux"
would be great!
I've cleaned William's bashdiff page removing the sections that had nothing to do with bash and modifying the commands to match Puppy's file organization.
It has excellent examples on how to use the added functionality.
It is now on the Puppy subversion repository on the following project:
http://svn2.cvsdude.com/puppylinux/pupp ... ages/trunk.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to