delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/04/21/16:57:30

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.9 required=5.0 tests=AWL,BAYES_50
X-Spam-Check-By: sourceware.org
X-ExtLoop1: 1
X-SMTPAuthUserID: ab2325
Message-ID: <EABCB54EDE5E4A5A882BB49893B330A6@cit.wayne.edu>
From: "Lee Maschmeyer" <lee_maschmeyer AT wayne DOT edu>
To: <cygwin AT cygwin DOT com>
Subject: I think there's an error in the boxes postinstall script
Date: Thu, 21 Apr 2011 16:57:09 -0400
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

------=_NextPart_000_0009_01CC0045.26F97D90
Content-Type: text/plain;
	format=flowed;
	charset="iso-8859-1";
	reply-type=original
Content-Transfer-Encoding: 7bit

Hi all,

Attached is a typescript that I hope shows the error I keep getting from 
/etc/postinstall/boxes.sh. I'm running Cygwin 1.7.9-1 on Windows XP. 
Everything is, or certainly is intended to be, fully updated.

HTH,

-- 
Lee Maschmeyer
Wayne State University Computing Center
5925 Woodward, #281
Detroit MI 48202
USA 

------=_NextPart_000_0009_01CC0045.26F97D90
Content-Type: application/octet-stream;
	name="typescript"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="typescript"

Script started on Thu, Apr 21, 2011 16:01:03
$ ./boxes.sh
#!/bin/sh -xv
# Copyright (C) 2007 Jari Aalto; Licenced under GPL v2 or later
#
# /etc/postinstall/<package>.sh -- Custom installation steps

PATH=3D"/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:$PATH"
+ PATH=3D'/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/home/lmaschm/bin:/u=
sr/local/bin:/usr/bin:/c/Program Files/Common Files/Microsoft Shared/Window=
s Live:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/Program F=
iles/Intel/DMIX:/c/WINDOWS/system32/WindowsPowerShell/v1.0:/c/WINDOWS/syste=
m32/WindowsPowerShell/v1.0:/c/Program Files/Common Files/SYSTEM/MSMAPI/1033=
:/c/Program Files/Common Files/Microsoft Shared/Windows Live:/usr/lib/lapac=
k'

set -e
+ set -e

Environment()
{
    #  Define variables to the rest of the script

    [ "$1" ] && dest=3D"$1"        # install destination

    if [ "$dest" ]; then
        #  Delete trailing slash
        dest=3D$(echo $dest | sed -e 's,/$,,' )
    fi

    package=3D"boxes"        #!! CHANGE THIS

    #   This file will be installed as
    #   /etc/postinstall/<package>.sh so derive <package>
    #   But if this file is run from CYGIN-PATCHES/postinstall.sh
    #   then we do not know the package name

    name=3D$(echo $0 | sed -e 's,.*/,,' -e 's,\.sh,,' )

    if [ "$name" !=3D "postinstall" ]; then
        package=3D"$name"
    fi

    bindir=3D"$dest/usr/bin"
    libdir=3D"$dest/usr/lib"
    libdirx11=3D"$dest/usr/lib/X11"
    includedir=3D"$dest/usr/include"

    sharedir=3D"$dest/usr/share"
    infodir=3D"$sharedir/info"
    docdir=3D"$sharedir/doc"
    etcdir=3D"$dest/etc"

    #   1) list of files to be copied to /etc
    #   2) Source locations

    conffiles_to=3D"$etcdir/preremove/$package-manifest.lst"
    conffiles_from=3D"$etcdir/preremove/$package-manifest-from.lst"
}

Warn ()
{
    echo "$@" >&2
}

Run ()
{
    ${test+echo} "$@"
}

InstallConffiles ()
{
    [ ! -f $conffiles_to ] && return

    #  Install default configuration files for system wide

    latest=3D$(LC_ALL=3DC find /usr/share/doc/$package*/ \
               -maxdepth 0 -type d \
             | sort | tail -1 | sed 's,/$,,')

    if [ ! "$latest" ]; then
        Warn "$0: [FATAL] Cannot find $package install doc dir"
        exit 1
    fi

    [ ! -f $conffiles_from ] && return
    [ ! -f $conffiles_to   ] && return

    tmpprefix=3D${TEMPDIR:-/tmp}/tmp$$
    from=3D$tmpprefix.from
    to=3D$tmpprefix.to

    #  Filter out all comments. Grep only lines with filenames

    grep -E '^[^#]*/|^[[:space]]*$' $conffiles_from > $from
    grep -E '^[^#]*/|^[[:space]]*$' $conffiles_to   > $to

    paste $from $to  |
    {
        while read from to
        do
            from=3D$(echo $dest$from | sed "s,\$PKGDOCDIR,$pkgdocdir$latest=
," )
            to=3D$(echo $dest$to | sed "s,\$PKG,$pkgdocdir," )

            [ ! -f $to ] && Run install -m 0644 $from $to
        done
    }

    rm -f $tmpprefix.*
}

Main()
{
    Environment "$@"    &&
    InstallConffiles
}

Main "$@"
+ Main
+ Environment
+ '[' '' ']'
+ '[' '' ']'
+ package=3Dboxes
echo $0 | sed -e 's,.*/,,' -e 's,\.sh,,' )
echo $0 | sed -e 's,.*/,,' -e 's,\.sh,,'=20
++ echo ./boxes.sh
++ sed -e 's,.*/,,' -e 's,\.sh,,'
+ name=3Dboxes
+ '[' boxes '!=3D' postinstall ']'
+ package=3Dboxes
+ bindir=3D/usr/bin
+ libdir=3D/usr/lib
+ libdirx11=3D/usr/lib/X11
+ includedir=3D/usr/include
+ sharedir=3D/usr/share
+ infodir=3D/usr/share/info
+ docdir=3D/usr/share/doc
+ etcdir=3D/etc
+ conffiles_to=3D/etc/preremove/boxes-manifest.lst
+ conffiles_from=3D/etc/preremove/boxes-manifest-from.lst
+ InstallConffiles
+ '[' '!' -f /etc/preremove/boxes-manifest.lst ']'
LC_ALL=3DC find /usr/share/doc/$package*/                -maxdepth 0 -type =
d              | sort | tail -1 | sed 's,/$,,')
LC_ALL=3DC find /usr/share/doc/$package*/                -maxdepth 0 -type =
d              | sort | tail -1 | sed 's,/$,,'
++ LC_ALL=3DC
++ find /usr/share/doc/boxes-1.0.1a/ -maxdepth 0 -type d
++ sort
++ tail -1
++ sed 's,/$,,'
+ latest=3D/usr/share/doc/boxes-1.0.1a
+ '[' '!' /usr/share/doc/boxes-1.0.1a ']'
+ '[' '!' -f /etc/preremove/boxes-manifest-from.lst ']'
+ '[' '!' -f /etc/preremove/boxes-manifest.lst ']'
+ tmpprefix=3D/tmp/tmp5576
+ from=3D/tmp/tmp5576.from
+ to=3D/tmp/tmp5576.to
+ grep -E '^[^#]*/|^[[:space]]*$' /etc/preremove/boxes-manifest-from.lst
grep: Unmatched [ or [^
$ exit

Script done on Thu, Apr 21, 2011 16:02:28


------=_NextPart_000_0009_01CC0045.26F97D90
Content-Type: text/plain; charset=us-ascii

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
------=_NextPart_000_0009_01CC0045.26F97D90--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019