#!/bin/sh
#item   ####description                                      ###on off ###
TMP=/var/log/setup/tmp
if [ ! -d $TMP ]; then
  mkdir -p $TMP
fi
cat /dev/null > $TMP/SeTnewtag
dialog --title "SELECTING PACKAGES FROM SERIES MAC (PPC Stuff)" \
       --checklist "Please select the packages you wish to install \
from series MAC. Use the \
UP/DOWN keys to scroll through the list, and the SPACE key to select \
the packages you wish to install. Recommended packages have \
already been selected for you, but you may unselect them if you wish. \
Press ENTER when you are \
done." 22 74 9 \
"hfsutils" "HFS Utils, needed by yaboot" "on" \
"macfdisk" "fdisk for mac-partitions" "on" \
"pmacutils" "Utils for the nvram, needed by yaboot" "on" \
"yaboot" "Bootloader for NewWorld macs" "on" \
"pbbuttonsd" "Power- and iBook hotkey daemon" "on" \
"gtkpbbuttons" "GTK-Frontend for pbbuttonsd" "on" \
2> $TMP/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
  rm -f $TMP/SeTpkgs
  cat /dev/null > $TMP/SeTnewtag
  for PKG in hfsutils macfdisk pmacutils yaboot pbbuttonsd gtkpbbuttons ; do
    echo "$PKG: SKP" >> $TMP/SeTnewtag
  done
  exit
fi
cat /dev/null > $TMP/SeTnewtag
for PKG in hfsutils macfdisk pmacutils yaboot pbbuttonsd gtkpbbuttons ; do
  if grep $PKG $TMP/SeTpkgs 1> /dev/null 2> /dev/null ; then
    echo "$PKG: ADD" >> $TMP/SeTnewtag
  else
    echo "$PKG: SKP" >> $TMP/SeTnewtag
  fi
done
rm -f $TMP/SeTpkgs
