Mon Jan 28 23:03:48 2008 UTC ()
minor portability fix and minor bug fix (tested for the presence of the wrong file)


(dmcmahill)
diff -r1.11 -r1.12 pkgsrc/pkgtools/cdpack/files/cdpack.sh

cvs diff -r1.11 -r1.12 pkgsrc/pkgtools/cdpack/files/cdpack.sh (expand / switch to unified diff)

--- pkgsrc/pkgtools/cdpack/files/cdpack.sh 2007/11/28 16:18:01 1.11
+++ pkgsrc/pkgtools/cdpack/files/cdpack.sh 2008/01/28 23:03:48 1.12
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1#!/bin/sh 1#!/bin/sh
2# $NetBSD: cdpack.sh,v 1.11 2007/11/28 16:18:01 mishka Exp $ 2# $NetBSD: cdpack.sh,v 1.12 2008/01/28 23:03:48 dmcmahill Exp $
3# 3#
4# Copyright (c) 2001, 2002, 2003, 2005 Dan McMahill, All rights reserved. 4# Copyright (c) 2001, 2002, 2003, 2005 Dan McMahill, All rights reserved.
5# 5#
6# Redistribution and use in source and binary forms, with or without 6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions 7# modification, are permitted provided that the following conditions
8# are met: 8# are met:
9# 1. Redistributions of source code must retain the above copyright 9# 1. Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer. 10# notice, this list of conditions and the following disclaimer.
11# 2. Redistributions in binary form must reproduce the above copyright 11# 2. Redistributions in binary form must reproduce the above copyright
12# notice, this list of conditions and the following disclaimer in the 12# notice, this list of conditions and the following disclaimer in the
13# documentation and/or other materials provided with the distribution. 13# documentation and/or other materials provided with the distribution.
14# 3. All advertising materials mentioning features or use of this software 14# 3. All advertising materials mentioning features or use of this software
15# must display the following acknowledgement: 15# must display the following acknowledgement:
@@ -585,27 +585,27 @@ ${SORT} ${indexf}.tmp > $indexf @@ -585,27 +585,27 @@ ${SORT} ${indexf}.tmp > $indexf
585# 585#
586 586
587if [ "$VERBOSE" = "yes" ]; then 587if [ "$VERBOSE" = "yes" ]; then
588 echo "Copying .index and .restricted files to the image directories." 588 echo "Copying .index and .restricted files to the image directories."
589fi 589fi
590 590
591ncds=0 591ncds=0
592for cdname in `cat $cdlist` 592for cdname in `cat $cdlist`
593do 593do
594 if [ -f $indexf ]; then 594 if [ -f $indexf ]; then
595 (cd ${cddir}/${cdname} && cp $indexf .index) 595 (cd ${cddir}/${cdname} && cp $indexf .index)
596 fi 596 fi
597 597
598 if [ -f $indexf ]; then 598 if [ -f $restricted ]; then
599 (cd ${cddir}/${cdname} && cp $restricted .restricted) 599 (cd ${cddir}/${cdname} && cp $restricted .restricted)
600 fi 600 fi
601 601
602 if [ "$ADD_README" = "yes" ]; then 602 if [ "$ADD_README" = "yes" ]; then
603 if [ "$VERBOSE" = "yes" ]; then 603 if [ "$VERBOSE" = "yes" ]; then
604 echo "Copying README.txt file" 604 echo "Copying README.txt file"
605 fi 605 fi
606 (cd ${cddir}/${cdname} && sed -e "s/@DISKNAME@/$cdname/g" \ 606 (cd ${cddir}/${cdname} && sed -e "s/@DISKNAME@/$cdname/g" \
607 -e "s/@NDISKS@/${numdisks}/g" \ 607 -e "s/@NDISKS@/${numdisks}/g" \
608 < $readme > README.txt) 608 < $readme > README.txt)
609 fi 609 fi
610 610
611 if [ $USE_XTRA = "yes" ]; then 611 if [ $USE_XTRA = "yes" ]; then
@@ -640,27 +640,27 @@ mkisofs_flags="-v -v -f -l -r -J -allow- @@ -640,27 +640,27 @@ mkisofs_flags="-v -v -f -l -r -J -allow-
640echo "Creating the ISO images" 640echo "Creating the ISO images"
641cdn=1 641cdn=1
642for cdname in `cat $cdlist` 642for cdname in `cat $cdlist`
643do 643do
644 echo "----------- $cdname ----------" 644 echo "----------- $cdname ----------"
645 #mkisofs_flags2=" -volset-ID $cdname -volset-seqno $cdn " 645 #mkisofs_flags2=" -volset-ID $cdname -volset-seqno $cdn "
646 mkisofs_flags2=" -V ${volid}$cdn " 646 mkisofs_flags2=" -V ${volid}$cdn "
647 echo "( cd ${cddir} && mkisofs $mkisofs_flags $mkisofs_flags2 -o ${cdname}.iso $cdname >> $mkisofslog 2>&1)" 647 echo "( cd ${cddir} && mkisofs $mkisofs_flags $mkisofs_flags2 -o ${cdname}.iso $cdname >> $mkisofslog 2>&1)"
648 ( cd ${cddir} && mkisofs $mkisofs_flags $mkisofs_flags2 -o ${cdname}.iso $cdname >> $mkisofslog 2>&1) 648 ( cd ${cddir} && mkisofs $mkisofs_flags $mkisofs_flags2 -o ${cdname}.iso $cdname >> $mkisofslog 2>&1)
649 if [ $? != 0 ]; then 649 if [ $? != 0 ]; then
650 echo "mkisofs failed" 650 echo "mkisofs failed"
651 clean_and_exit 651 clean_and_exit
652 fi 652 fi
653 cdn=$(($cdn + 1)) 653 cdn=`${EXPR} $cdn + 1`
654done 654done
655 655
656echo "ISO Images are available in $cddir" 656echo "ISO Images are available in $cddir"
657 657
658if [ -f $warnings ]; then 658if [ -f $warnings ]; then
659 echo "There were warnings generated:" 659 echo "There were warnings generated:"
660 cat $warnings 660 cat $warnings
661fi 661fi
662 662
663echo "-----------------------------------------------------------" 663echo "-----------------------------------------------------------"
664echo "* Please note: This ${what} set was created with ${space}*" 664echo "* Please note: This ${what} set was created with ${space}*"
665echo "* *" 665echo "* *"
666if [ "$ALLOW_NO_BIN_ON_CDROM" = "no" ]; then 666if [ "$ALLOW_NO_BIN_ON_CDROM" = "no" ]; then