#!/bin/sh
cat /dev/null > /tmp/SeTnewtag
dialog --title "select pkgs from gnome_parts(GNOME related packages)" \
  --checklist "select packages from gnome_parts series. \
You can move cursor with UP/DOWN key and push space \
key to select pkgs. After finish selecting, \
push Enter to start installation. " 24 72 15 \
"easytag" "" "on" \
"evince" "" "on" \
"gcalctool" "" "on" \
"gconf_tree" "" "on" \
"glade3" "" "on" \
"gmime" "" "on" \
"gnome_common" "" "on" \
"gnome_doc_utils" "" "on" \
"gnome_icon_theme" "" "on" \
"gnome_keyring" "" "on" \
"gnome_media" "" "on" \
"gnome_mime_data" "" "on" \
"gnome_python" "" "on" \
"gnome_terminal" "" "on" \
"gnome_vfs" "" "on" \
"gsettings_desktop_schemas" "" "on" \
"gst_ffmpeg" "" "on" \
"gst_libav_1" "" "on" \
"gst_plugins_bad" "" "on" \
"gst_plugins_bad_1" "" "on" \
"gst_plugins_base" "" "on" \
"gst_plugins_base_1" "" "on" \
"gst_plugins_gl" "" "on" \
"gst_plugins_good" "" "on" \
"gst_plugins_good_1" "" "on" \
"gst_plugins_ugly" "" "on" \
"gst_plugins_ugly_1" "" "on" \
"gst_python" "" "on" \
"gstreamer" "" "on" \
"gstreamer_1" "" "on" \
"gtk_vnc" "" "on" \
"gtkpod" "" "on" \
"gucharmap" "" "on" \
"gvfs" "" "on" \
"inkscape" "" "on" \
"json_glib" "" "on" \
"libart_lgpl" "" "on" \
"libbonobo" "" "on" \
"libbonoboui" "" "on" \
"libgdata" "" "on" \
"libgnome" "" "on" \
"libgnome_keyring" "" "on" \
"libgnomecanvas" "" "on" \
"libgnomeui" "" "on" \
"libgpod" "" "on" \
"libimobiledevice" "" "on" \
"libnice" "" "on" \
"libplist" "" "on" \
"netcat" "" "on" \
"pidgin" "" "on" \
"pidgin_musictracker" "" "on" \
"polkit_gnome" "" "on" \
"rarian" "" "on" \
"rhythmbox" "" "on" \
"totem" "" "on" \
"totem_pl_parser" "" "on" \
"usbmuxd" "" "on" \
"vala" "" "on" \
"vinagre" "" "on" \
2> /tmp/SeTpkgs
if [ $? = 1 -o $? = 255 ]; then
  rm -f /tmp/SeTpkgs
  > /tmp/SeTnewtag
  for pkg in easytag evince gcalctool gconf_tree glade3 gmime gnome_common gnome_doc_utils gnome_icon_theme gnome_keyring gnome_media gnome_mime_data gnome_python gnome_terminal gnome_vfs gsettings_desktop_schemas gst_ffmpeg gst_libav_1 gst_plugins_bad gst_plugins_bad_1 gst_plugins_base gst_plugins_base_1 gst_plugins_gl gst_plugins_good gst_plugins_good_1 gst_plugins_ugly gst_plugins_ugly_1 gst_python gstreamer gstreamer_1 gtk_vnc gtkpod gucharmap gvfs inkscape json_glib libart_lgpl libbonobo libbonoboui libgdata libgnome libgnome_keyring libgnomecanvas libgnomeui libgpod libimobiledevice libnice libplist netcat pidgin pidgin_musictracker polkit_gnome rarian rhythmbox totem totem_pl_parser usbmuxd vala vinagre  ; do 
  echo "$pkg: SKP" >> /tmp/SeTnewtag
  done
  exit
fi
cat /dev/null > /tmp/SeTnewtag
for PACKAGE in easytag evince gcalctool gconf_tree glade3 gmime gnome_common gnome_doc_utils gnome_icon_theme gnome_keyring gnome_media gnome_mime_data gnome_python gnome_terminal gnome_vfs gsettings_desktop_schemas gst_ffmpeg gst_libav_1 gst_plugins_bad gst_plugins_bad_1 gst_plugins_base gst_plugins_base_1 gst_plugins_gl gst_plugins_good gst_plugins_good_1 gst_plugins_ugly gst_plugins_ugly_1 gst_python gstreamer gstreamer_1 gtk_vnc gtkpod gucharmap gvfs inkscape json_glib libart_lgpl libbonobo libbonoboui libgdata libgnome libgnome_keyring libgnomecanvas libgnomeui libgpod libimobiledevice libnice libplist netcat pidgin pidgin_musictracker polkit_gnome rarian rhythmbox totem totem_pl_parser usbmuxd vala vinagre  ; 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
