#!/bin/sh
cat /dev/null > /tmp/SeTnewtag
dialog --title "xfce(XFce4 Desktop Environment)シリーズの選択" \
  --checklist "xfce シリーズの中からインストールしたいパッケージを \
選んでください．カーソルの上下キーで \
対象を選択し，space キーでマーク(X)します． \
Enter キーでインストールを開始します．" 24 72 15 \
"elementary_xfce" "Xfce用基本テーマ集" "on" \
"exo" "libexo" "off" \
"garcon" "garconメニューライブラリ" "on" \
"gtk_xfce_engine" "GTK Xfce エンジン" "on" \
"libopenraw" "libopenraw" "off" \
"libxfce4ui" "xfce4 UI ライブラリ" "on" \
"libxfce4util" "Xfce4 用ユーティリティ集" "off" \
"libxfcegui4" "Xfce4 GUI 用ライブラリ" "off" \
"mousepad" "Xfce 用テキストエディタ" "off" \
"orage" "Xfce用カレンダーツール" "off" \
"parole" "Paroleメディアプレイヤー" "on" \
"ristretto" "Xfce 用画像ビューワー ristretto" "off" \
"thunar" "Thunar" "on" \
"thunar_volman" "Thunar用ボリュームマネージャ" "on" \
"tumbler" "DBus用サムネイラーTumbler" "on" \
"xfce4_appfinder" "アプリケーション・ファインダー" "off" \
"xfce4_battery_plugin" "Xfce4バッテリ管理プラグイン" "on" \
"xfce4_cpufreq_plugin" "Xfce4 CPU周波数管理プラグイン" "on" \
"xfce4_cpugraph_plugin" "Xfce4 CPUグラフプラグイン" "on" \
"xfce4_dev_tools" "Xfce4 用開発ツール" "off" \
"xfce4_eyes_plugin" "Xfce4目玉プラグイン" "on" \
"xfce4_icon_theme" "Xfce4 用アイコンテーマ" "off" \
"xfce4_notes_plugin" "Xfce4 付箋紙ツール" "on" \
"xfce4_notifyd" "Xfce4用通知デーモン" "on" \
"xfce4_panel" "Xfce4 用パネル" "off" \
"xfce4_power_manager" "Xfce4用電源管理ツール" "on" \
"xfce4_pulseaudio_plugin" "xfce4_pulseaudio_plugin" "on" \
"xfce4_screenshooter_plugin" "Xfce4スクリーンショットプラグイン" "on" \
"xfce4_sensors_plugin" "Xfce4センサープラグイン" "on" \
"xfce4_session" "Xfce4 セッション管理" "off" \
"xfce4_settings" "Xfce用設定ツール" "off" \
"xfce4_systemload_plugin" "Xfce4システム負荷プラグイン" "on" \
"xfce4_taskmanager" "Xfce4タスクマネージャ" "on" \
"xfce4_terminal" "ターミナルエミュレーター" "off" \
"xfce4_time_out_plugin" "Xfce4タイムアウトプラグイン" "on" \
"xfce_theme_albatross" "Xfce Albatrossテーマ" "on" \
"xfce_theme_greybird" "greybird Xfce テーマ" "on" \
"xfce_theme_numix" "Numix Xfce テーマ" "on" \
"xfce_theme_orion" "Orion Xfceテーマ" "on" \
"xfconf" "Xfce 用設定システム" "off" \
"xfdesktop" "xfdesktop" "off" \
"xfwm4" "Xfce4 ウィンドウマネージャ" "off" \
"xfwm4_themes" "xfwm4用テーマ集" "on" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
  rm -f /tmp/SeTpkgs
  > /tmp/SeTnewtag
  for pkg in elementary_xfce exo garcon gtk_xfce_engine libopenraw libxfce4ui libxfce4util libxfcegui4 mousepad orage parole ristretto thunar thunar_volman tumbler xfce4_appfinder xfce4_battery_plugin xfce4_cpufreq_plugin xfce4_cpugraph_plugin xfce4_dev_tools xfce4_eyes_plugin xfce4_icon_theme xfce4_notes_plugin xfce4_notifyd xfce4_panel xfce4_power_manager xfce4_pulseaudio_plugin xfce4_screenshooter_plugin xfce4_sensors_plugin xfce4_session xfce4_settings xfce4_systemload_plugin xfce4_taskmanager xfce4_terminal xfce4_time_out_plugin xfce_theme_albatross xfce_theme_greybird xfce_theme_numix xfce_theme_orion xfconf xfdesktop xfwm4 xfwm4_themes  ; do 
  echo "$pkg: SKP" >> /tmp/SeTnewtag
  done
  exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in elementary_xfce exo garcon gtk_xfce_engine libopenraw libxfce4ui libxfce4util libxfcegui4 mousepad orage parole ristretto thunar thunar_volman tumbler xfce4_appfinder xfce4_battery_plugin xfce4_cpufreq_plugin xfce4_cpugraph_plugin xfce4_dev_tools xfce4_eyes_plugin xfce4_icon_theme xfce4_notes_plugin xfce4_notifyd xfce4_panel xfce4_power_manager xfce4_pulseaudio_plugin xfce4_screenshooter_plugin xfce4_sensors_plugin xfce4_session xfce4_settings xfce4_systemload_plugin xfce4_taskmanager xfce4_terminal xfce4_time_out_plugin xfce_theme_albatross xfce_theme_greybird xfce_theme_numix xfce_theme_orion xfconf xfdesktop xfwm4 xfwm4_themes  ; 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
