Subversion Repositories SvarDOS

Rev

Rev 2167 | Rev 2169 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2167 Rev 2168
Line 77... Line 77...
77
# $7 list of packages
77
# $7 list of packages
78
# $8 where to put a copy of the image (optional)
78
# $8 where to put a copy of the image (optional)
79
function prep_flop {
79
function prep_flop {
80
  WORKDIR="$5/$6"
80
  WORKDIR="$5/$6"
81
  LIST=$7
81
  LIST=$7
-
 
82
  DISKPREFIX="svdos-$6-disk"
82
  mkdir "$WORKDIR"
83
  mkdir "$WORKDIR"
83
  mformat -C -t $1 -h $2 -s $3 -v $CURDATE -B "$CUSTFILES/floppy.mbr" -i "$WORKDIR/disk1.img"
84
  mformat -C -t $1 -h $2 -s $3 -v $CURDATE -B "$CUSTFILES/floppy.mbr" -i "$WORKDIR/$DISKPREFIX-1.img"
84
 
85
 
85
  # copy basic files (installer, startup files...)
86
  # copy basic files (installer, startup files...)
86
  mcopy -sQm -i "$WORKDIR/disk1.img" "$FLOPROOT/"* ::/
87
  mcopy -sQm -i "$WORKDIR/$DISKPREFIX-1.img" "$FLOPROOT/"* ::/
87
 
88
 
88
  # generate the INSTALL.LST file
89
  # generate the INSTALL.LST file
89
  for pkg in $7 ; do
90
  for pkg in $7 ; do
90
    echo "$pkg" >> "$WORKDIR/install.lst"
91
    echo "$pkg" >> "$WORKDIR/install.lst"
91
  done
92
  done
92
  mcopy -i "$WORKDIR/disk1.img" "$WORKDIR/install.lst" ::/
93
  mcopy -i "$WORKDIR/$DISKPREFIX-1.img" "$WORKDIR/install.lst" ::/
93
  rm "$WORKDIR/install.lst"
94
  rm "$WORKDIR/install.lst"
94
 
95
 
95
  # now populate the floppies with *.svp packages
96
  # now populate the floppies with *.svp packages
96
  curdisk=1
97
  curdisk=1
97
 
98
 
Line 99... Line 100...
99
 
100
 
100
    unset PENDING
101
    unset PENDING
101
    for p in $LIST ; do
102
    for p in $LIST ; do
102
      # if copy fails, then probably the floppy is full - try other packages
103
      # if copy fails, then probably the floppy is full - try other packages
103
      # but remember all that fails so they will be retried on a new floppy
104
      # but remember all that fails so they will be retried on a new floppy
104
      if ! mcopy -mi "$WORKDIR/disk$curdisk.img" "$CDROOT/$p.svp" ::/ ; then
105
      if ! mcopy -mi "$WORKDIR/$DISKPREFIX-$curdisk.img" "$CDROOT/$p.svp" ::/ ; then
105
        PENDING="$PENDING $p"
106
        PENDING="$PENDING $p"
106
      fi
107
      fi
107
    done
108
    done
108
 
109
 
109
    LIST="$PENDING"
110
    LIST="$PENDING"
110
    # if there are any pending items, then create a new floppy and try pushing pending packages to it
111
    # if there are any pending items, then create a new floppy and try pushing pending packages to it
111
    if [ ! -z "$PENDING" ] ; then
112
    if [ ! -z "$PENDING" ] ; then
112
      curdisk=$((curdisk+1))
113
      curdisk=$((curdisk+1))
113
      mformat -C -t $1 -h $2 -s $3 -v SVARDOS -i "$WORKDIR/disk$curdisk.img"
114
      mformat -C -t $1 -h $2 -s $3 -v SVARDOS -i "$WORKDIR/$DISKPREFIX-$curdisk.img"
114
    fi
115
    fi
115
 
116
 
116
  done
117
  done
117
 
118
 
118
  # add a short readme
119
  # add a short readme
Line 122... Line 123...
122
  echo "" >> "$WORKDIR/readme.txt"
123
  echo "" >> "$WORKDIR/readme.txt"
123
  echo "Latest SvarDOS version is available on the project's homepage: http://svardos.org" >> "$WORKDIR/readme.txt"
124
  echo "Latest SvarDOS version is available on the project's homepage: http://svardos.org" >> "$WORKDIR/readme.txt"
124
 
125
 
125
  unix2dos "$WORKDIR/readme.txt"
126
  unix2dos "$WORKDIR/readme.txt"
126
 
127
 
127
  # make a copy of the image, if requested
128
  # make a copy of the (first) image, if requested
128
  if [ "x$8" != "x" ] ; then
129
  if [ "x$8" != "x" ] ; then
129
    cp "$WORKDIR/disk1.img" $8
130
    cp "$WORKDIR/$DISKPREFIX-1.img" $8
130
  fi
131
  fi
131
 
132
 
132
  # zip the images (and remove them at the same time)
133
  # zip the images (and remove them at the same time)
133
  zip -9 -rmj "$PUBDIR/svardos-$CURDATE-floppy-$6.zip" "$WORKDIR"/*
134
  zip -9 -rmj "$PUBDIR/svardos-$CURDATE-floppy-$6.zip" "$WORKDIR"/*
134
 
135