From 0ca93179a9a984fad1da893e0147bdbb510222ea Mon Sep 17 00:00:00 2001 From: Valentin Villenave Date: Sun, 21 Nov 2010 18:50:29 +0100 Subject: [PATCH] GUB: add architecture compatibility check. --- gub/commands.py | 2 +- sourcefiles/lilypond-sharhead.sh | 30 +++++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/gub/commands.py b/gub/commands.py index ade6f47..adc0e5b 100644 --- a/gub/commands.py +++ b/gub/commands.py @@ -456,7 +456,7 @@ class CreateShar (SerializedCommand): header_length = 0 _z = misc.compression_flag (tarball) header_length = len (script % locals ()) + 1 - used_in_sharhead = '%(base_file)s %(name)s %(pretty_name)s %(version)s %(release)s %(header_length)s %(_z)s' + used_in_sharhead = '%(base_file)s %(name)s %(pretty_name)s %(version)s %(release)s %(header_length)s %(target_cpu)s %(_z)s' used_in_sharhead % locals () loggedos.dump_file (logger, script % locals (), shar_file) loggedos.system (logger, 'cat %(tarball)s >> %(shar_file)s' % locals ()) diff --git a/sourcefiles/lilypond-sharhead.sh b/sourcefiles/lilypond-sharhead.sh index d7945d7..09e18ae 100644 --- a/sourcefiles/lilypond-sharhead.sh +++ b/sourcefiles/lilypond-sharhead.sh @@ -5,6 +5,8 @@ root="$HOME" doc=no extract=no interactive=yes +arch=$(uname -m) +shopt -s nocasematch if test `id -u` = "0"; then root=/usr/local @@ -60,18 +62,44 @@ done cat < %(base_file)s exit 0 fi + if test "$interactive" = "yes"; then cat <