diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2005-05-09 12:21:28 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2005-05-09 12:21:28 (GMT) |
commit | cd2d70e467e418c1a63e703f3e06df3cb2e92b87 (patch) | |
tree | 903309d2edc52dfdbb86d130ccc4e06cb71b0e15 /cut-n-paste/update-from-egg.sh | |
parent | b36f3a13160e8747019c40f28df89a9a9c3917ea (diff) |
Share it between all cut-n-paste subdirs
2005-05-09 Marco Pesenti Gritti <mpg@redhat.com>
* cut-n-paste/update-from-egg.sh:
Share it between all cut-n-paste subdirs
* cut-n-paste/recent-files/Makefile.am:
Fix to use "global" update-from-egg.sh
* cut-n-paste/recent-files/egg-recent-model.c:
(egg_recent_model_changed_timeout), (egg_recent_model_finalize):
* cut-n-paste/recent-files/egg-recent-view-gtk.c:
(egg_recent_view_gtk_clear), (egg_recent_view_gtk_set_list),
(egg_recent_view_gtk_finalize), (egg_recent_view_gtk_set_menu):
Update from libegg
* cut-n-paste/toolbar-editor/Makefile.am:
Fix to use "global" update-from-egg.sh
* cut-n-paste/toolbar-editor/eggmarshalers.list:
Update from libegg
Diffstat (limited to 'cut-n-paste/update-from-egg.sh')
-rwxr-xr-x | cut-n-paste/update-from-egg.sh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/cut-n-paste/update-from-egg.sh b/cut-n-paste/update-from-egg.sh new file mode 100755 index 0000000..5069044 --- /dev/null +++ b/cut-n-paste/update-from-egg.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +function die() { + echo $* + exit 1 +} + +if test -z "$EGGDIR"; then + echo "Must set EGGDIR" + exit 1 +fi + +if test -z "$EGGFILES"; then + echo "Must set EGGFILES" + exit 1 +fi + +for FILE in $EGGFILES; do + SRCFILE=$EGGDIR/$FILE + if ! test -e $SRCFILE ; then + if test -e $EGGDIR/tray/$FILE ; then + SRCFILE=$EGGDIR/tray/$FILE + fi + if test -e $EGGDIR/util/$FILE ; then + SRCFILE=$EGGDIR/util/$FILE + fi + if test -e $EGGDIR/toolbareditor/$FILE ; then + SRCFILE=$EGGDIR/toolbareditor/$FILE + fi + if test -e $EGGDIR/treeviewutils/$FILE ; then + SRCFILE=$EGGDIR/treeviewutils/$FILE + fi + fi + if cmp -s $SRCFILE $FILE; then + echo "File $FILE is unchanged" + else + cp $SRCFILE $FILE || die "Could not move $SRCFILE to $FILE" + echo "Updated $FILE" + fi +done |