#!/bin/sh
cat /dev/null > /tmp/SeTnewtag
dialog --title "gnm(GNOME Desktop Environment)シリーズの選択" \
  --checklist "gnm シリーズの中からインストールしたいパッケージを \
選んでください．カーソルの上下キーで \
対象を選択し，space キーでマーク(X)します． \
Enter キーでインストールを開始します．" 24 72 15 \
"PolicyKit_gnome" "GNOME 用 PolicyKit ツール" "off" \
"desktop" "GNOME/desktop" "off" \
"ekiga" "ekiga ソフトフォン" "off" \
"empathy" "n" "off" \
"fifth-toe" "GNOME/Fifth-toe" "off" \
"gconf_tree" "gconf 設定データ" "off" \
"geektoys" "GNOME/geektoys" "off" \
"gnome_common" "GNOME プロジェクト用ヘッダー" "off" \
"gnome_mime_data" "GNOME MIME データ" "off" \
"guile" "Guile (GNU's Ubiquitous Intelligent Language for Extensions)" "off" \
"libbonobo" "libbonobo" "off" \
"libbonoboui" "libbonoboui" "off" \
"libgnome" "libgnome" "off" \
"libgnomecanvas" "libgnome 用 canvas ウィジェット" "off" \
"libgnomeui" "libgnomeui" "off" \
"mono" "C#/.Net 互換環境 Mono" "on" \
"office" "GNOME/office" "off" \
"swf" "OSSな swf デコーダー, プレイヤー" "off" \
"yelp" "GNOMEヘルプシステム" "off" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
  rm -f /tmp/SeTpkgs
  > /tmp/SeTnewtag
  for pkg in PolicyKit_gnome desktop ekiga empathy fifth-toe gconf_tree geektoys gnome_common gnome_mime_data guile libbonobo libbonoboui libgnome libgnomecanvas libgnomeui mono office swf yelp  ; do 
  echo "$pkg: SKP" >> /tmp/SeTnewtag
  done
  exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in PolicyKit_gnome desktop ekiga empathy fifth-toe gconf_tree geektoys gnome_common gnome_mime_data guile libbonobo libbonoboui libgnome libgnomecanvas libgnomeui mono office swf yelp  ; do
    if grep "$PACKAGE" /tmp/SeTpkgs 1> /dev/null 2> /dev/null ; then
        echo "$PACKAGE: ADD" >> /tmp/SeTnewtag
    else echo "$PACKAGE: SKP" >> /tmp/SeTnewtag
    fi
done
rm -f /tmp/SeTpkgs
