| @@ -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 | |
587 | if [ "$VERBOSE" = "yes" ]; then | | 587 | if [ "$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." |
589 | fi | | 589 | fi |
590 | | | 590 | |
591 | ncds=0 | | 591 | ncds=0 |
592 | for cdname in `cat $cdlist` | | 592 | for cdname in `cat $cdlist` |
593 | do | | 593 | do |
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- |
640 | echo "Creating the ISO images" | | 640 | echo "Creating the ISO images" |
641 | cdn=1 | | 641 | cdn=1 |
642 | for cdname in `cat $cdlist` | | 642 | for cdname in `cat $cdlist` |
643 | do | | 643 | do |
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` |
654 | done | | 654 | done |
655 | | | 655 | |
656 | echo "ISO Images are available in $cddir" | | 656 | echo "ISO Images are available in $cddir" |
657 | | | 657 | |
658 | if [ -f $warnings ]; then | | 658 | if [ -f $warnings ]; then |
659 | echo "There were warnings generated:" | | 659 | echo "There were warnings generated:" |
660 | cat $warnings | | 660 | cat $warnings |
661 | fi | | 661 | fi |
662 | | | 662 | |
663 | echo "-----------------------------------------------------------" | | 663 | echo "-----------------------------------------------------------" |
664 | echo "* Please note: This ${what} set was created with ${space}*" | | 664 | echo "* Please note: This ${what} set was created with ${space}*" |
665 | echo "* *" | | 665 | echo "* *" |
666 | if [ "$ALLOW_NO_BIN_ON_CDROM" = "no" ]; then | | 666 | if [ "$ALLOW_NO_BIN_ON_CDROM" = "no" ]; then |