#!/bin/sh
cat /dev/null > /tmp/SeTnewtag
dialog --title "xfce(XFce Desktop Environment)シリーズの選択"   --checklist "xfceシリーズの中からインストールしたいパッケージを 選んでください．カーソルの上下キーで 対象を選択し，space キーでマーク(X)します． Enter キーでインストールを開始します．" 24 72 15 "Thunar" "thunar ファイルマネージャー" "on" \
"elementary_xfce" "Xfce用基本テーマ集" "on" \
"exo" "libexo " "on" \
"garcon" "garconメニューライブラリ" "on" \
"gtk_xfce_engine" "GTK Xfce エンジン" "on" \
"libburn" "CD/DVD/BDメディア用ライブラリ" "on" \
"libdbusmenu" "DBus用メニュー構造体ライブラリ" "on" \
"libisofs" "ISO-9660用ライブラリ" "on" \
"libxfce4ui" "xfce4 UI ライブラリ" "on" \
"libxfce4util" "Xfce4 用ユーティリティ集" "on" \
"libxfce4windowing" "Xfce用X11/Waylandウィンドウ用ライブラリ" "on" \
"mousepad" "Xfce 用テキストエディタ" "on" \
"orage" "スケジュール管理ツール orage" "on" \
"parole" "Paroleメディアプレイヤー" "on" \
"ristretto" "Xfce 用画像ビューワー ristretto" "on" \
"thunar_archive_plugin" "Thunar File Manager用の圧縮・展開プラグイン" "on" \
"thunar_media_tags_plugin" "Thunar用メディアタグプラグイン" "on" \
"thunar_volman" "Thunar用ボリュームマネージャ" "on" \
"tumbler" "DBus用サムネイラーTumbler" "on" \
"xfburn" "CD/DVD/BDライター xfburn" "on" \
"xfce4_appfinder" "アプリケーション・ファインダー" "on" \
"xfce4_battery_plugin" "Xfce4バッテリ管理プラグイン" "on" \
"xfce4_clipman_plugin" "Xfce用クリップボード管理ツール" "on" \
"xfce4_dev_tools" "Xfce4 用開発ツール" "on" \
"xfce4_notifyd" "Xfce4用通知デーモン" "on" \
"xfce4_panel" "Xfce4 用パネル" "on" \
"xfce4_panel_profiles" "Xfce4-panel-profiles" "on" \
"xfce4_power_manager" "Xfce4用電源管理ツール" "on" \
"xfce4_pulseaudio_plugin" "Xfce4 PulseAudio プラグイン" "on" \
"xfce4_screenshooter" "Xfce4スクリーンシューター" "on" \
"xfce4_sensors_plugin" "Xfce4センサープラグイン" "on" \
"xfce4_session" "Xfce4 セッション管理" "on" \
"xfce4_settings" "Xfce用設定ツール" "on" \
"xfce4_systemload_plugin" "Xfce4システム負荷プラグイン" "on" \
"xfce4_terminal" "ターミナルエミュレーター" "on" \
"xfce4_wavelan_plugin" "Xfce4用wavelanプラグイン " "on" \
"xfce4_weather_plugin" "Xfceパネル用天気情報表示プラグイン" "on" \
"xfce4_xkb_plugin" "XKB用Xfce4プラグイン" "on" \
"xfce_theme_Greybird" "Xfce用Greybirdテーマ" "on" \
"xfconf" "Xfce 用設定システム" "on" \
"xfdesktop" "xfdesktop" "on" \
"xfwm4" "Xfce4 ウィンドウマネージャ" "on" \
"xiccd" "colord/X 接続デーモン" "on" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
  rm -f /tmp/SeTpkgs
  > /tmp/SeTnewtag
  for pkg in Thunar elementary_xfce exo garcon gtk_xfce_engine libburn libdbusmenu libisofs libxfce4ui libxfce4util libxfce4windowing mousepad orage parole ristretto thunar_archive_plugin thunar_media_tags_plugin thunar_volman tumbler xfburn xfce4_appfinder xfce4_battery_plugin xfce4_clipman_plugin xfce4_dev_tools xfce4_notifyd xfce4_panel xfce4_panel_profiles xfce4_power_manager xfce4_pulseaudio_plugin xfce4_screenshooter xfce4_sensors_plugin xfce4_session xfce4_settings xfce4_systemload_plugin xfce4_terminal xfce4_wavelan_plugin xfce4_weather_plugin xfce4_xkb_plugin xfce_theme_Greybird xfconf xfdesktop xfwm4 xiccd  ; do 
  echo "$pkg: SKP" >> /tmp/SeTnewtag
  done
  exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in Thunar elementary_xfce exo garcon gtk_xfce_engine libburn libdbusmenu libisofs libxfce4ui libxfce4util libxfce4windowing mousepad orage parole ristretto thunar_archive_plugin thunar_media_tags_plugin thunar_volman tumbler xfburn xfce4_appfinder xfce4_battery_plugin xfce4_clipman_plugin xfce4_dev_tools xfce4_notifyd xfce4_panel xfce4_panel_profiles xfce4_power_manager xfce4_pulseaudio_plugin xfce4_screenshooter xfce4_sensors_plugin xfce4_session xfce4_settings xfce4_systemload_plugin xfce4_terminal xfce4_wavelan_plugin xfce4_weather_plugin xfce4_xkb_plugin xfce_theme_Greybird xfconf xfdesktop xfwm4 xiccd ; 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

