[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: gaf.git: branch: stable-1.4 updated (1.4.1-20080929-7-gb9daae6)



The branch, stable-1.4 has been updated
       via  b9daae67b8af2c6a8d3bba3a921823c888b65614 (commit)
       via  9697d169ccb52b67990b55e508fd63ecd3033ab3 (commit)
       via  137c5ce36ec471392d6b0103486a0180f0bc338c (commit)
       via  4eee4ebea399b332179091a0679429015223f305 (commit)
       via  ad0e3027a721132c12727e1806979dadfc4af731 (commit)
       via  2b302915fdd5c385c7515b82d5a1dd5f02bcf2aa (commit)
       via  73b045e75d95d6633e51c5cfac63f25ea31e7c31 (commit)
      from  6cb66fef58470e627bbf33eac4a50d928a15b4c7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 gattrib/icon-theme-installer     |   28 +++++++------
 gattrib/src/s_sheet_data.c       |   21 ++++------
 gattrib/src/s_table.c            |   80 ++++++++++++++++++++++++--------------
 gnetlist/scripts/sch2eaglepos.sh |   14 +++++-
 gschem/icon-theme-installer      |   28 +++++++------
 libgeda/icon-theme-installer     |   28 +++++++------
 libgeda/src/o_complex_basic.c    |    4 +-
 7 files changed, 119 insertions(+), 84 deletions(-)


=================
 Commit Messages
=================

commit b9daae67b8af2c6a8d3bba3a921823c888b65614
Author: Dan McMahill <dan@xxxxxxxxxxxx>
Date:   Tue Dec 9 09:15:25 2008 +0000

    Avoid insecure temp file usage.
    
    Fixes the security vulnerability noted in http://secunia.com/advisories/32806/
    The issue is insecure temp file usage.  The fix is to create a private directory
    and keep temp files in there.

:100755 100755 08afb67... f38ef5d... M	gnetlist/scripts/sch2eaglepos.sh

commit 9697d169ccb52b67990b55e508fd63ecd3033ab3
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Dec 9 09:15:03 2008 +0000

    Calculate bounds of new object when copying an embedded complex.
    
    Adds call to o_complex_recalc() in o_complex_copy_embedded().

:100644 100644 138fa5d... c4b76b5... M	libgeda/src/o_complex_basic.c

commit 137c5ce36ec471392d6b0103486a0180f0bc338c
Author: Werner Hoch <werner.ho@xxxxxx>
Date:   Tue Dec 9 09:14:43 2008 +0000

    libgeda: changed object adding flag for embeded symbols [#1692626]
    
    Copying embeded symbols in gschem had ghost connections. When copying
    objects into the place buffer, the ADDING_SEL flag has to be set.

:100644 100644 b9769b6... 138fa5d... M	libgeda/src/o_complex_basic.c

commit 4eee4ebea399b332179091a0679429015223f305
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Dec 9 09:14:20 2008 +0000

    gattrib: Don't crash if we can't find data in the sheet. Bug #2214739
    
    Check for a -1 return from s_table_get_index() before
    using to index an array. Print ugly warnings to stderr
    and skip whatever we were doing if this is encountered.

:100644 100644 c698bb5... 30efb22... M	gattrib/src/s_table.c

commit ad0e3027a721132c12727e1806979dadfc4af731
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Dec 9 09:14:05 2008 +0000

    gattrib: Don't special-case ignore components with "graphical" attribute.
    
    It was noted that special-casing the "graphical" attribute could cause
    gattrib to crash on save (Bug #2214739).
    
    There is no real reason why the user might not want to edit a graphical
    symol's attributes with gattrib, so we should treat it like any other.

:100644 100644 fc05ad4... 8b8b601... M	gattrib/src/s_sheet_data.c
:100644 100644 a1530a1... c698bb5... M	gattrib/src/s_table.c

commit 2b302915fdd5c385c7515b82d5a1dd5f02bcf2aa
Author: Ales Hvezda <ahvezda@-e false.(none)>
Date:   Tue Dec 9 09:12:05 2008 +0000

    Fixed up all icon-theme-installer files to work with non-bash
    
    Grabbed the latest icon-theme-installer files from the pcb repository
    since they have been fully patched to work with non-bash shells.  On
    my ubuntu system, /bin/sh is linked to dash which prevented me from
    running the previous version of icon-theme-installer.  This commit
    is related to a7e7a28613abe4705ec01011d0f4308ff024251b

:100755 100755 eba95e1... e070868... M	gattrib/icon-theme-installer
:100755 100755 eba95e1... e070868... M	gschem/icon-theme-installer
:100755 100755 eba95e1... e070868... M	libgeda/icon-theme-installer

commit 73b045e75d95d6633e51c5cfac63f25ea31e7c31
Author: Carlos Nieves Onega <cnieves@xxxxxxxxxx>
Date:   Tue Dec 9 09:12:04 2008 +0000

    Changed shell from bash to sh in icon-theme-installer
    
    Changed shell from bash to sh in icon-theme-installer.
    This commit is still not tested in non-bash systems.
    
    Applied partially geda patch #1978537 (only bash to sh
    change, not removal of $INSTALL_DATA_EXEC check) from
    anonymous contributor and Dan McMahill's test case
    change in line 103 from:
    
    http://pcb.cvs.sourceforge.net/pcb/pcb/icon-theme-installer?r1=1.1&r2=1.2

:100755 100755 8cc0e79... eba95e1... M	gattrib/icon-theme-installer
:100755 100755 8cc0e79... eba95e1... M	gschem/icon-theme-installer
:100755 100755 8cc0e79... eba95e1... M	libgeda/icon-theme-installer

=========
 Changes
=========

commit b9daae67b8af2c6a8d3bba3a921823c888b65614
Author: Dan McMahill <dan@xxxxxxxxxxxx>
Date:   Tue Dec 9 09:15:25 2008 +0000

    Avoid insecure temp file usage.
    
    Fixes the security vulnerability noted in http://secunia.com/advisories/32806/
    The issue is insecure temp file usage.  The fix is to create a private directory
    and keep temp files in there.

diff --git a/gnetlist/scripts/sch2eaglepos.sh b/gnetlist/scripts/sch2eaglepos.sh
index 08afb67..f38ef5d 100755
--- a/gnetlist/scripts/sch2eaglepos.sh
+++ b/gnetlist/scripts/sch2eaglepos.sh
@@ -20,8 +20,15 @@ YOFFSET=33000
 XSCALE=9000
 YSCALE=9000
 
-TMP=/tmp/$$
-grep -B1 refdes= "$FNAME" |sed 's/=/ /' | cut -d" " -f2,3 |grep -v '^--' >/tmp/$$
+tmpdir=/tmp/$$
+mkdir -m 0700 -p $tmpdir
+rc=$?
+if test $rc -ne 0 ; then
+	echo "Failed to create $tmpdir with 0700 permissions.  mkdir returned $rc."
+	exit 1
+fi
+TMP=${tmpdir}/tmpf
+grep -B1 refdes= "$FNAME" |sed 's/=/ /' | cut -d" " -f2,3 |grep -v '^--' >${TMP}
 
 3<$TMP
 while read -u 3; do
@@ -34,4 +41,5 @@ while read -u 3; do
     Y=`echo "scale=5; ($Y - $YOFFSET) / $YSCALE" |bc`
     echo "MOVE '$PART' ($X $Y);"
 done
-rm "$TMP"
+rm -fr "${tmpdir}"
+

commit 9697d169ccb52b67990b55e508fd63ecd3033ab3
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Dec 9 09:15:03 2008 +0000

    Calculate bounds of new object when copying an embedded complex.
    
    Adds call to o_complex_recalc() in o_complex_copy_embedded().

diff --git a/libgeda/src/o_complex_basic.c b/libgeda/src/o_complex_basic.c
index 138fa5d..c4b76b5 100644
--- a/libgeda/src/o_complex_basic.c
+++ b/libgeda/src/o_complex_basic.c
@@ -919,6 +919,8 @@ OBJECT *o_complex_copy_embedded(TOPLEVEL *toplevel, OBJECT *list_tail,
 	
   new_obj->complex->prim_objs = return_head(temp_list);
 
+  o_complex_recalc(toplevel, new_obj);
+
   /* here you need to create a list of attributes which need to be 
    * connected to the new list, probably make an attribute list and
    * fill it with sid's of the attributes */

commit 137c5ce36ec471392d6b0103486a0180f0bc338c
Author: Werner Hoch <werner.ho@xxxxxx>
Date:   Tue Dec 9 09:14:43 2008 +0000

    libgeda: changed object adding flag for embeded symbols [#1692626]
    
    Copying embeded symbols in gschem had ghost connections. When copying
    objects into the place buffer, the ADDING_SEL flag has to be set.

diff --git a/libgeda/src/o_complex_basic.c b/libgeda/src/o_complex_basic.c
index b9769b6..138fa5d 100644
--- a/libgeda/src/o_complex_basic.c
+++ b/libgeda/src/o_complex_basic.c
@@ -915,7 +915,7 @@ OBJECT *o_complex_copy_embedded(TOPLEVEL *toplevel, OBJECT *list_tail,
   temp_list = o_list_copy_all(toplevel,
                               o_current->complex->prim_objs->next,
                               new_obj->complex->prim_objs, 
-                              NORMAL_FLAG);
+                              toplevel->ADDING_SEL);
 	
   new_obj->complex->prim_objs = return_head(temp_list);
 

commit 4eee4ebea399b332179091a0679429015223f305
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Dec 9 09:14:20 2008 +0000

    gattrib: Don't crash if we can't find data in the sheet. Bug #2214739
    
    Check for a -1 return from s_table_get_index() before
    using to index an array. Print ugly warnings to stderr
    and skip whatever we were doing if this is encountered.

diff --git a/gattrib/src/s_table.c b/gattrib/src/s_table.c
index c698bb5..30efb22 100644
--- a/gattrib/src/s_table.c
+++ b/gattrib/src/s_table.c
@@ -209,6 +209,14 @@ STRING_LIST *s_table_create_attrib_pair(gchar *row_name,
   attrib_pair_list = s_string_list_new();
 
   row = s_table_get_index(row_list, row_name);
+  /* Sanity check */
+  if (row == -1) {
+    /* we didn't find the item in the list */
+    fprintf (stderr,
+             "In s_table_create_attrib_pair, we didn't find the row name in the row list!\n");
+    return attrib_pair_list;
+  }
+
   for (col = 0; col < num_attribs; col++) {
     /* pull attrib from table.  If non-null, add it to attrib_pair_list  */
     if ( (table[row][col]).attrib_value != NULL) {
@@ -300,19 +308,27 @@ void s_table_add_toplevel_comp_items_to_comp_table(OBJECT *start_obj) {
               /* Get row and col where to put this attrib */
               row = s_table_get_index(sheet_head->master_comp_list_head, temp_uref);
               col = s_table_get_index(sheet_head->master_comp_attrib_list_head, attrib_name);
+              /* Sanity check */
+              if (row == -1 || col == -1) {
+                /* we didn't find the item in the table */
+                fprintf (stderr,
+                         "In s_table_add_toplevel_comp_items_to_comp_table, we didn't find either row or col in the lists!\n");
+              } else {
+
 #if DEBUG
-              printf("       In s_table_add_toplevel_comp_items_to_comp_table, about to add row %d, col %d, attrib_value = %s\n",
-                     row, col, attrib_value);
-              printf(" . . . current address of attrib_value cell is [%p]\n", &((sheet_head->component_table)[row][col]).attrib_value);
+                printf("       In s_table_add_toplevel_comp_items_to_comp_table, about to add row %d, col %d, attrib_value = %s\n",
+                       row, col, attrib_value);
+                printf(" . . . current address of attrib_value cell is [%p]\n", &((sheet_head->component_table)[row][col]).attrib_value);
 #endif
-              /* Is there a compelling reason for me to put this into a separate fcn? */
-              ((sheet_head->component_table)[row][col]).row = row;
-              ((sheet_head->component_table)[row][col]).col = col;
-              ((sheet_head->component_table)[row][col]).row_name = g_strdup(temp_uref);
-              ((sheet_head->component_table)[row][col]).col_name = g_strdup(attrib_name);
-              ((sheet_head->component_table)[row][col]).attrib_value = g_strdup(attrib_value);
-              ((sheet_head->component_table)[row][col]).visibility = old_visibility;
-              ((sheet_head->component_table)[row][col]).show_name_value = old_show_name_value;
+                /* Is there a compelling reason for me to put this into a separate fcn? */
+                ((sheet_head->component_table)[row][col]).row = row;
+                ((sheet_head->component_table)[row][col]).col = col;
+                ((sheet_head->component_table)[row][col]).row_name = g_strdup(temp_uref);
+                ((sheet_head->component_table)[row][col]).col_name = g_strdup(attrib_name);
+                ((sheet_head->component_table)[row][col]).attrib_value = g_strdup(attrib_value);
+                ((sheet_head->component_table)[row][col]).visibility = old_visibility;
+                ((sheet_head->component_table)[row][col]).show_name_value = old_show_name_value;
+              }
             }
             g_free(attrib_name);
             g_free(attrib_text);
@@ -493,18 +509,26 @@ void s_table_add_toplevel_pin_items_to_pin_table(OBJECT *start_obj) {
 		  /* Get row and col where to put this attrib */
 		  row = s_table_get_index(sheet_head->master_pin_list_head, row_label);
 		  col = s_table_get_index(sheet_head->master_pin_attrib_list_head, attrib_name);
+                  /* Sanity check */
+                  if (row == -1 || col == -1) {
+                    /* we didn't find the item in the table */
+                    fprintf (stderr,
+                             "In s_table_add_toplevel_pin_items_to_pin_table, we didn't find either row or col in the lists!\n");
+                  } else {
+
 #if DEBUG
-		  printf("       In s_table_add_toplevel_pin_items_to_pin_table, about to add row %d, col %d, attrib_value = %s\n",
-			 row, col, attrib_value);
-		  printf(" . . . current address of attrib_value cell is [%p]\n", &((sheet_head->component_table)[row][col]).attrib_value);
+                    printf("       In s_table_add_toplevel_pin_items_to_pin_table, about to add row %d, col %d, attrib_value = %s\n",
+                           row, col, attrib_value);
+                    printf(" . . . current address of attrib_value cell is [%p]\n", &((sheet_head->component_table)[row][col]).attrib_value);
 #endif
-		  /* Is there a compelling reason for me to put this into a separate fcn? */
-		  ((sheet_head->pin_table)[row][col]).row = row;
-		  ((sheet_head->pin_table)[row][col]).col = col;
-		  ((sheet_head->pin_table)[row][col]).row_name = g_strdup(row_label);
-		  ((sheet_head->pin_table)[row][col]).col_name = g_strdup(attrib_name);
-		  ((sheet_head->pin_table)[row][col]).attrib_value = g_strdup(attrib_value);
-		}
+                    /* Is there a compelling reason for me to put this into a separate fcn? */
+                    ((sheet_head->pin_table)[row][col]).row = row;
+                    ((sheet_head->pin_table)[row][col]).col = col;
+                    ((sheet_head->pin_table)[row][col]).row_name = g_strdup(row_label);
+                    ((sheet_head->pin_table)[row][col]).col_name = g_strdup(attrib_name);
+                    ((sheet_head->pin_table)[row][col]).attrib_value = g_strdup(attrib_value);
+                  }
+                }
 		g_free(attrib_name);
 		g_free(attrib_text);
 		g_free(attrib_value);

commit ad0e3027a721132c12727e1806979dadfc4af731
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Dec 9 09:14:05 2008 +0000

    gattrib: Don't special-case ignore components with "graphical" attribute.
    
    It was noted that special-casing the "graphical" attribute could cause
    gattrib to crash on save (Bug #2214739).
    
    There is no real reason why the user might not want to edit a graphical
    symol's attributes with gattrib, so we should treat it like any other.

diff --git a/gattrib/src/s_sheet_data.c b/gattrib/src/s_sheet_data.c
index fc05ad4..8b8b601 100644
--- a/gattrib/src/s_sheet_data.c
+++ b/gattrib/src/s_sheet_data.c
@@ -120,11 +120,10 @@ void s_sheet_data_add_master_comp_list_items(OBJECT *start_obj) {
       printf("In s_sheet_data_add_master_comp_list_items, examining o_current->name = %s\n", o_current->name);
 #endif
 
-      /*-----  only process if this is a non-graphical comp with attributes ----*/
-      if ( (o_current->type == OBJ_COMPLEX) &&
-	    o_current->attribs && 
-	    !o_attrib_search_component(o_current, "graphical") ) {    
-	
+      /*-----  only process if this is a component with attributes ----*/
+      if (o_current->type == OBJ_COMPLEX &&
+          o_current->attribs != NULL) {
+
 #if DEBUG
 	printf("      In s_sheet_data_add_master_comp_list_items; found component on page\n");
 	printf(". . . . complex_basename = %s.\n", o_current->complex_basename);
@@ -186,12 +185,10 @@ void s_sheet_data_add_master_comp_attrib_list_items(OBJECT *start_obj) {
       printf("In s_sheet_data_add_master_comp_attrib_list_items, examining o_current->name = %s\n", o_current->name);
 #endif
 
-      /*-----  only process if this is a non-graphical comp with attributes ----*/
-      if ( (o_current->type == OBJ_COMPLEX) &&
-	    o_current->attribs && 
-	    !o_attrib_search_component(o_current, "graphical") ) {    
+      /*-----  only process if this is a component with attributes ----*/
+      if (o_current->type == OBJ_COMPLEX &&
+          o_current->attribs != NULL) {
 
-	
 	verbose_print(" C");
 	
 	/*------ Iterate through all attribs found on component -----*/
@@ -332,8 +329,8 @@ void s_sheet_data_add_master_pin_list_items(OBJECT *start_obj) {
 	  
 	} else {          /* didn't find refdes.  Report error to log. */
 #ifdef DEBUG
-	  fprintf(stderr, "In s_sheet_data_add_master_pin_list_items, found non-graphical component with no refdes.\n");
-	  fprintf(stderr, ". . . . complex_basename = %s.\n", o_current->complex_basename);
+          fprintf(stderr, "In s_sheet_data_add_master_pin_list_items, found component with no refdes.\n");
+          fprintf(stderr, ". . . . complex_basename = %s.\n", o_current->complex_basename);
 #endif
 	}
 	g_free(temp_uref);
diff --git a/gattrib/src/s_table.c b/gattrib/src/s_table.c
index a1530a1..c698bb5 100644
--- a/gattrib/src/s_table.c
+++ b/gattrib/src/s_table.c
@@ -264,10 +264,9 @@ void s_table_add_toplevel_comp_items_to_comp_table(OBJECT *start_obj) {
 #endif
 
     /* -----  Now process objects found on page  ----- */
-    if ( (o_current->type == OBJ_COMPLEX) &&
-          o_current->attribs &&
-         !o_attrib_search_component(o_current, "graphical") ) {
-                                                              
+    if (o_current->type == OBJ_COMPLEX &&
+        o_current->attribs != NULL) {
+
       /* ---- Don't process part if it lacks a refdes ----- */
       temp_uref = g_strdup(s_attrib_get_refdes(o_current));
       if (temp_uref) {
@@ -456,10 +455,9 @@ void s_table_add_toplevel_pin_items_to_pin_table(OBJECT *start_obj) {
 #endif
 
     /* -----  Now process objects found on page  ----- */
-    if ( (o_current->type == OBJ_COMPLEX) &&
-          o_current->attribs &&
-         !o_attrib_search_component(o_current, "graphical") ) {
-                                                              
+    if (o_current->type == OBJ_COMPLEX &&
+        o_current->attribs != NULL) {
+
       /* ---- Don't process part if it lacks a refdes ----- */
       temp_uref = s_attrib_get_refdes(o_current);
       if (temp_uref) {

commit 2b302915fdd5c385c7515b82d5a1dd5f02bcf2aa
Author: Ales Hvezda <ahvezda@-e false.(none)>
Date:   Tue Dec 9 09:12:05 2008 +0000

    Fixed up all icon-theme-installer files to work with non-bash
    
    Grabbed the latest icon-theme-installer files from the pcb repository
    since they have been fully patched to work with non-bash shells.  On
    my ubuntu system, /bin/sh is linked to dash which prevented me from
    running the previous version of icon-theme-installer.  This commit
    is related to a7e7a28613abe4705ec01011d0f4308ff024251b

diff --git a/gattrib/icon-theme-installer b/gattrib/icon-theme-installer
index eba95e1..e070868 100755
--- a/gattrib/icon-theme-installer
+++ b/gattrib/icon-theme-installer
@@ -75,7 +75,7 @@ while getopts "iut:b:d:s:m:x:" flag; do
 		i) INSTALL=yes ;;
 		u) UNINSTALL=yes ;;
 		t) THEME_NAME=$OPTARG ;;
-		d) INSTALL_DEST_DIR=${OPTARG##x} ;;
+		d) INSTALL_DEST_DIR="`echo $OPTARG | sed 's;^x;;'`" ;;
 		b) INSTALL_BASE_DIR=$OPTARG ;;
 		s) SRC_DIR=$OPTARG ;;
 		m) MKINSTALLDIRS_EXEC=$OPTARG ;;
@@ -83,7 +83,7 @@ while getopts "iut:b:d:s:m:x:" flag; do
 	esac
 done
 
-shift $(($OPTIND - 1))
+shift `expr $OPTIND - 1`
 
 if test "x$INSTALL" = "xyes" -a "x$UNINSTALL" = "xyes"; then
 	echo "Cannot pass both -i and -u"
@@ -103,7 +103,7 @@ if test -z "$INSTALL_BASE_DIR"; then
 	exit 1
 fi
 
-if test ! -x $(echo "$MKINSTALLDIRS_EXEC" | cut -f1 -d' '); then
+if test ! -x `echo "$MKINSTALLDIRS_EXEC" | cut -f1 -d' '`; then
 	echo "Cannot find '$MKINSTALLDIRS_EXEC'; You probably want to pass -m \$(mkinstalldirs)"
 	exit 1
 fi
@@ -118,11 +118,11 @@ if test -z "$SRC_DIR"; then
 fi
 
 for icon in $@; do
-	size=$(echo $icon | sed -n "s/.*-\([0-9]*\).*/\1/p")
-	category=$(echo $icon | cut -d, -f1)
-	build_name=$(echo $icon | cut -d, -f2)
-	install_name=$(echo $build_name | sed "s/-[0-9]\+//g")
-	install_name=$(basename $install_name)
+	size=`echo $icon | sed -n 's/.*-\([0-9]*\).*/\1/p'`
+	category=`echo $icon | cut -d, -f1`
+	build_name=`echo $icon | cut -d, -f2`
+	install_name=`echo $build_name | sed 's/-[0-9]\+//g'`
+	install_name=`basename $install_name`
 
 	if test -z $size; then 
 		size=scalable;
@@ -136,12 +136,12 @@ for icon in $@; do
 	if test "x$INSTALL" = "xyes"; then
 		echo "Installing $size $install_name into $THEME_NAME icon theme"
 		
-		$($MKINSTALLDIRS_EXEC $install_dir) || {
+		$MKINSTALLDIRS_EXEC $install_dir || {
 			echo "Failed to create directory $install_dir"
 			exit 1
 		}
 		
-		$($INSTALL_DATA_EXEC $SRC_DIR/$build_name $install_path) || {
+		$INSTALL_DATA_EXEC $SRC_DIR/$build_name $install_path || {
 			echo "Failed to install $SRC_DIR/$build_name into $install_path"
 			exit 1
 		}
@@ -163,7 +163,9 @@ for icon in $@; do
 done
 
 if test "x$INSTALL" = "xyes"; then
-	gtk_update_icon_cache_bin="$((which gtk-update-icon-cache || echo /opt/gnome/bin/gtk-update-icon-cache)2>/dev/null)"
+	gtk_update_icon_cache_bin="`(which gtk-update-icon-cache || echo /opt/gnome/bin/gtk-update-icon-cache)2>/dev/null`"
+	gtk_update_icon_cache_bin="${GTK_UPDATE_ICON_CACHE_BIN:-$gtk_update_icon_cache_bin}"
+
 	gtk_update_icon_cache="$gtk_update_icon_cache_bin -f -t $INSTALL_BASE_DIR"
 
 	if test -z "$INSTALL_DEST_DIR"; then 
diff --git a/gschem/icon-theme-installer b/gschem/icon-theme-installer
index eba95e1..e070868 100755
--- a/gschem/icon-theme-installer
+++ b/gschem/icon-theme-installer
@@ -75,7 +75,7 @@ while getopts "iut:b:d:s:m:x:" flag; do
 		i) INSTALL=yes ;;
 		u) UNINSTALL=yes ;;
 		t) THEME_NAME=$OPTARG ;;
-		d) INSTALL_DEST_DIR=${OPTARG##x} ;;
+		d) INSTALL_DEST_DIR="`echo $OPTARG | sed 's;^x;;'`" ;;
 		b) INSTALL_BASE_DIR=$OPTARG ;;
 		s) SRC_DIR=$OPTARG ;;
 		m) MKINSTALLDIRS_EXEC=$OPTARG ;;
@@ -83,7 +83,7 @@ while getopts "iut:b:d:s:m:x:" flag; do
 	esac
 done
 
-shift $(($OPTIND - 1))
+shift `expr $OPTIND - 1`
 
 if test "x$INSTALL" = "xyes" -a "x$UNINSTALL" = "xyes"; then
 	echo "Cannot pass both -i and -u"
@@ -103,7 +103,7 @@ if test -z "$INSTALL_BASE_DIR"; then
 	exit 1
 fi
 
-if test ! -x $(echo "$MKINSTALLDIRS_EXEC" | cut -f1 -d' '); then
+if test ! -x `echo "$MKINSTALLDIRS_EXEC" | cut -f1 -d' '`; then
 	echo "Cannot find '$MKINSTALLDIRS_EXEC'; You probably want to pass -m \$(mkinstalldirs)"
 	exit 1
 fi
@@ -118,11 +118,11 @@ if test -z "$SRC_DIR"; then
 fi
 
 for icon in $@; do
-	size=$(echo $icon | sed -n "s/.*-\([0-9]*\).*/\1/p")
-	category=$(echo $icon | cut -d, -f1)
-	build_name=$(echo $icon | cut -d, -f2)
-	install_name=$(echo $build_name | sed "s/-[0-9]\+//g")
-	install_name=$(basename $install_name)
+	size=`echo $icon | sed -n 's/.*-\([0-9]*\).*/\1/p'`
+	category=`echo $icon | cut -d, -f1`
+	build_name=`echo $icon | cut -d, -f2`
+	install_name=`echo $build_name | sed 's/-[0-9]\+//g'`
+	install_name=`basename $install_name`
 
 	if test -z $size; then 
 		size=scalable;
@@ -136,12 +136,12 @@ for icon in $@; do
 	if test "x$INSTALL" = "xyes"; then
 		echo "Installing $size $install_name into $THEME_NAME icon theme"
 		
-		$($MKINSTALLDIRS_EXEC $install_dir) || {
+		$MKINSTALLDIRS_EXEC $install_dir || {
 			echo "Failed to create directory $install_dir"
 			exit 1
 		}
 		
-		$($INSTALL_DATA_EXEC $SRC_DIR/$build_name $install_path) || {
+		$INSTALL_DATA_EXEC $SRC_DIR/$build_name $install_path || {
 			echo "Failed to install $SRC_DIR/$build_name into $install_path"
 			exit 1
 		}
@@ -163,7 +163,9 @@ for icon in $@; do
 done
 
 if test "x$INSTALL" = "xyes"; then
-	gtk_update_icon_cache_bin="$((which gtk-update-icon-cache || echo /opt/gnome/bin/gtk-update-icon-cache)2>/dev/null)"
+	gtk_update_icon_cache_bin="`(which gtk-update-icon-cache || echo /opt/gnome/bin/gtk-update-icon-cache)2>/dev/null`"
+	gtk_update_icon_cache_bin="${GTK_UPDATE_ICON_CACHE_BIN:-$gtk_update_icon_cache_bin}"
+
 	gtk_update_icon_cache="$gtk_update_icon_cache_bin -f -t $INSTALL_BASE_DIR"
 
 	if test -z "$INSTALL_DEST_DIR"; then 
diff --git a/libgeda/icon-theme-installer b/libgeda/icon-theme-installer
index eba95e1..e070868 100755
--- a/libgeda/icon-theme-installer
+++ b/libgeda/icon-theme-installer
@@ -75,7 +75,7 @@ while getopts "iut:b:d:s:m:x:" flag; do
 		i) INSTALL=yes ;;
 		u) UNINSTALL=yes ;;
 		t) THEME_NAME=$OPTARG ;;
-		d) INSTALL_DEST_DIR=${OPTARG##x} ;;
+		d) INSTALL_DEST_DIR="`echo $OPTARG | sed 's;^x;;'`" ;;
 		b) INSTALL_BASE_DIR=$OPTARG ;;
 		s) SRC_DIR=$OPTARG ;;
 		m) MKINSTALLDIRS_EXEC=$OPTARG ;;
@@ -83,7 +83,7 @@ while getopts "iut:b:d:s:m:x:" flag; do
 	esac
 done
 
-shift $(($OPTIND - 1))
+shift `expr $OPTIND - 1`
 
 if test "x$INSTALL" = "xyes" -a "x$UNINSTALL" = "xyes"; then
 	echo "Cannot pass both -i and -u"
@@ -103,7 +103,7 @@ if test -z "$INSTALL_BASE_DIR"; then
 	exit 1
 fi
 
-if test ! -x $(echo "$MKINSTALLDIRS_EXEC" | cut -f1 -d' '); then
+if test ! -x `echo "$MKINSTALLDIRS_EXEC" | cut -f1 -d' '`; then
 	echo "Cannot find '$MKINSTALLDIRS_EXEC'; You probably want to pass -m \$(mkinstalldirs)"
 	exit 1
 fi
@@ -118,11 +118,11 @@ if test -z "$SRC_DIR"; then
 fi
 
 for icon in $@; do
-	size=$(echo $icon | sed -n "s/.*-\([0-9]*\).*/\1/p")
-	category=$(echo $icon | cut -d, -f1)
-	build_name=$(echo $icon | cut -d, -f2)
-	install_name=$(echo $build_name | sed "s/-[0-9]\+//g")
-	install_name=$(basename $install_name)
+	size=`echo $icon | sed -n 's/.*-\([0-9]*\).*/\1/p'`
+	category=`echo $icon | cut -d, -f1`
+	build_name=`echo $icon | cut -d, -f2`
+	install_name=`echo $build_name | sed 's/-[0-9]\+//g'`
+	install_name=`basename $install_name`
 
 	if test -z $size; then 
 		size=scalable;
@@ -136,12 +136,12 @@ for icon in $@; do
 	if test "x$INSTALL" = "xyes"; then
 		echo "Installing $size $install_name into $THEME_NAME icon theme"
 		
-		$($MKINSTALLDIRS_EXEC $install_dir) || {
+		$MKINSTALLDIRS_EXEC $install_dir || {
 			echo "Failed to create directory $install_dir"
 			exit 1
 		}
 		
-		$($INSTALL_DATA_EXEC $SRC_DIR/$build_name $install_path) || {
+		$INSTALL_DATA_EXEC $SRC_DIR/$build_name $install_path || {
 			echo "Failed to install $SRC_DIR/$build_name into $install_path"
 			exit 1
 		}
@@ -163,7 +163,9 @@ for icon in $@; do
 done
 
 if test "x$INSTALL" = "xyes"; then
-	gtk_update_icon_cache_bin="$((which gtk-update-icon-cache || echo /opt/gnome/bin/gtk-update-icon-cache)2>/dev/null)"
+	gtk_update_icon_cache_bin="`(which gtk-update-icon-cache || echo /opt/gnome/bin/gtk-update-icon-cache)2>/dev/null`"
+	gtk_update_icon_cache_bin="${GTK_UPDATE_ICON_CACHE_BIN:-$gtk_update_icon_cache_bin}"
+
 	gtk_update_icon_cache="$gtk_update_icon_cache_bin -f -t $INSTALL_BASE_DIR"
 
 	if test -z "$INSTALL_DEST_DIR"; then 

commit 73b045e75d95d6633e51c5cfac63f25ea31e7c31
Author: Carlos Nieves Onega <cnieves@xxxxxxxxxx>
Date:   Tue Dec 9 09:12:04 2008 +0000

    Changed shell from bash to sh in icon-theme-installer
    
    Changed shell from bash to sh in icon-theme-installer.
    This commit is still not tested in non-bash systems.
    
    Applied partially geda patch #1978537 (only bash to sh
    change, not removal of $INSTALL_DATA_EXEC check) from
    anonymous contributor and Dan McMahill's test case
    change in line 103 from:
    
    http://pcb.cvs.sourceforge.net/pcb/pcb/icon-theme-installer?r1=1.1&r2=1.2

diff --git a/gattrib/icon-theme-installer b/gattrib/icon-theme-installer
index 8cc0e79..eba95e1 100755
--- a/gattrib/icon-theme-installer
+++ b/gattrib/icon-theme-installer
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # icon-theme-installer
 # Copyright (C) 2006 Novell, Inc.
@@ -108,7 +108,7 @@ if test ! -x $(echo "$MKINSTALLDIRS_EXEC" | cut -f1 -d' '); then
 	exit 1
 fi
 
-if test ! -x $(echo "$INSTALL_DATA_EXEC" | cut -f1 -d' '); then
+if test ! -x `echo "$INSTALL_DATA_EXEC" | cut -f1 -d' '`; then
 	echo "Cannot find '$INSTALL_DATA_EXEC'; You probably want to pass -x \$(INSTALL_DATA)"
 	exit 1
 fi
diff --git a/gschem/icon-theme-installer b/gschem/icon-theme-installer
index 8cc0e79..eba95e1 100755
--- a/gschem/icon-theme-installer
+++ b/gschem/icon-theme-installer
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # icon-theme-installer
 # Copyright (C) 2006 Novell, Inc.
@@ -108,7 +108,7 @@ if test ! -x $(echo "$MKINSTALLDIRS_EXEC" | cut -f1 -d' '); then
 	exit 1
 fi
 
-if test ! -x $(echo "$INSTALL_DATA_EXEC" | cut -f1 -d' '); then
+if test ! -x `echo "$INSTALL_DATA_EXEC" | cut -f1 -d' '`; then
 	echo "Cannot find '$INSTALL_DATA_EXEC'; You probably want to pass -x \$(INSTALL_DATA)"
 	exit 1
 fi
diff --git a/libgeda/icon-theme-installer b/libgeda/icon-theme-installer
index 8cc0e79..eba95e1 100755
--- a/libgeda/icon-theme-installer
+++ b/libgeda/icon-theme-installer
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # icon-theme-installer
 # Copyright (C) 2006 Novell, Inc.
@@ -108,7 +108,7 @@ if test ! -x $(echo "$MKINSTALLDIRS_EXEC" | cut -f1 -d' '); then
 	exit 1
 fi
 
-if test ! -x $(echo "$INSTALL_DATA_EXEC" | cut -f1 -d' '); then
+if test ! -x `echo "$INSTALL_DATA_EXEC" | cut -f1 -d' '`; then
 	echo "Cannot find '$INSTALL_DATA_EXEC'; You probably want to pass -x \$(INSTALL_DATA)"
 	exit 1
 fi




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs