#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.6.1).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `#!/bin/sh' line above, then type `sh FILE'.
#
lock_dir=_sh23314
# Made on 2006-10-23 12:55 CDT by <gk4@gkraft4>.
# Source directory was `/home/gk4/a11y-gconf'.
#
# Existing files will *not* be overwritten, unless `-c' is specified.
#
# This shar contains:
# length mode       name
# ------ ---------- ------------------------------------------
#    784 -rwxrwxr-x gconf-at-setup.sh
#    541 -rwxrwxr-x gnome-at-screenreader
#    708 -rwxrwxr-x gnome-start-ats
#
MD5SUM=${MD5SUM-md5sum}
f=`${MD5SUM} --version | egrep '^md5sum .*(core|text)utils'`
test -n "${f}" && md5check=true || md5check=false
${md5check} || \
  echo 'Note: not verifying md5sums.  Consider installing GNU coreutils.'
save_IFS="${IFS}"
IFS="${IFS}:"
gettext_dir=FAILED
locale_dir=FAILED
first_param="$1"
for dir in $PATH
do
  if test "$gettext_dir" = FAILED && test -f $dir/gettext \
     && ($dir/gettext --version >/dev/null 2>&1)
  then
    case `$dir/gettext --version 2>&1 | sed 1q` in
      *GNU*) gettext_dir=$dir ;;
    esac
  fi
  if test "$locale_dir" = FAILED && test -f $dir/shar \
     && ($dir/shar --print-text-domain-dir >/dev/null 2>&1)
  then
    locale_dir=`$dir/shar --print-text-domain-dir`
  fi
done
IFS="$save_IFS"
if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED
then
  echo=echo
else
  TEXTDOMAINDIR=$locale_dir
  export TEXTDOMAINDIR
  TEXTDOMAIN=sharutils
  export TEXTDOMAIN
  echo="$gettext_dir/gettext -s"
fi
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null
then if (echo -n test; echo 1,2,3) | grep n >/dev/null
     then shar_n= shar_c='
'
     else shar_n=-n shar_c= ; fi
else shar_n= shar_c='\c' ; fi
f=shar-touch.$$
st1=200112312359.59
st2=123123592001.59
st2tr=123123592001.5 # old SysV 14-char limit
st3=1231235901

if touch -am -t ${st1} ${f} >/dev/null 2>&1 && \
   test ! -f ${st1} && test -f ${f}; then
  shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"'

elif touch -am ${st2} ${f} >/dev/null 2>&1 && \
   test ! -f ${st2} && test ! -f ${st2tr} && test -f ${f}; then
  shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"'

elif touch -am ${st3} ${f} >/dev/null 2>&1 && \
   test ! -f ${st3} && test -f ${f}; then
  shar_touch='touch -am $3$4$5$6$2 "$8"'

else
  shar_touch=:
  echo
  ${echo} 'WARNING: not restoring timestamps.  Consider getting and'
  ${echo} 'installing GNU `touch'\'', distributed in GNU File Utilities...'
  echo
fi
rm -f ${st1} ${st2} ${st2tr} ${st3} ${f}
#
if test ! -d ${lock_dir}
then : ; else ${echo} 'lock directory '${lock_dir}' exists'
  exit 1
fi
if mkdir ${lock_dir}
then ${echo} 'x - created lock directory `'${lock_dir}\''.'
else ${echo} 'x - failed to create lock directory `'${lock_dir}\''.'
  exit 1
fi
# ============= gconf-at-setup.sh ==============
if test -f 'gconf-at-setup.sh' && test "$first_param" != -c; then
  ${echo} 'x -SKIPPING gconf-at-setup.sh (file already exists)'
else
${echo} 'x - extracting gconf-at-setup.sh (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'gconf-at-setup.sh' &&
#!/bin/sh
X
unsetall() {
gconftool-2 --recursive-unset /desktop/gnome/accessibility/startup
gconftool-2 --recursive-unset /desktop/gnome/accessibility/session
}
X
newconfig() {
X
SR=/desktop/gnome/accessibility/session/screen-reader
gconftool-2 --type string --set $SR/command "lsr -s"
gconftool-2 --type bool --set $SR/start true
X
MAG=/desktop/gnome/accessibility/session/magnifier
gconftool-2 --type string --set $MAG/command "magnifier -m"
gconftool-2 --type bool --set $MAG/start true
X
OSK=/desktop/gnome/accessibility/session/onscreen-keyboard 
gconftool-2 --type string --set $OSK/command "gok"
gconftool-2 --type bool --set $OSK/start true
X
gconftool-2 --type list --list-type string --set /desktop/gnome/accessibility/session/other_ats ["foo -a","bar -b"]
X
}
X
unsetall
newconfig
SHAR_EOF
  (set 20 06 10 20 09 02 27 'gconf-at-setup.sh'; eval "$shar_touch") &&
  chmod 0775 'gconf-at-setup.sh'
if test $? -ne 0
then ${echo} 'restore of gconf-at-setup.sh failed'
fi
  if ${md5check}
  then (
       ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'gconf-at-setup.sh: MD5 check failed'
       ) << SHAR_EOF
16fc9095e131fcec02244886142af9c1  gconf-at-setup.sh
SHAR_EOF
  else
test `LC_ALL=C wc -c < 'gconf-at-setup.sh'` -ne 784 && \
  ${echo} 'restoration warning:  size of gconf-at-setup.sh is not 784'
  fi
fi
# ============= gnome-at-screenreader ==============
if test -f 'gnome-at-screenreader' && test "$first_param" != -c; then
  ${echo} 'x -SKIPPING gnome-at-screenreader (file already exists)'
else
${echo} 'x - extracting gnome-at-screenreader (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'gnome-at-screenreader' &&
#!/bin/sh
#
#	Copyright 2006 IBM Corp.
#
#	GPL v2.
#
X
case $(basename $0) in
X	gnome-at-screenreader)
X		AT=/desktop/gnome/accessibility/session/screen-reader
X		;;
X	gnome-at-magnifier)
X		AT=/desktop/gnome/accessibility/session/magnifier
X		;;
X	gnome-at-onscreenkeyboard)
X		AT=/desktop/gnome/accessibility/session/on-screen-keyboard
X		;;
X	*)
X		echo "unknown Assitive Technology"
X		exit 1
X		;;
esac
X
cmdline=$(gconftool-2 --get $AT/command)
if [ $? -ne 0 ]; then
X	exit $?
fi
X
if [ ! -z "$cmdline" ]; then
X	echo $cmdline
X	#exec $cmdline
fi
X
#EOF
X
SHAR_EOF
  (set 20 06 10 20 09 03 49 'gnome-at-screenreader'; eval "$shar_touch") &&
  chmod 0775 'gnome-at-screenreader'
if test $? -ne 0
then ${echo} 'restore of gnome-at-screenreader failed'
fi
  if ${md5check}
  then (
       ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'gnome-at-screenreader: MD5 check failed'
       ) << SHAR_EOF
172d3eb25ebe0a06ce6dfbc936a298f4  gnome-at-screenreader
SHAR_EOF
  else
test `LC_ALL=C wc -c < 'gnome-at-screenreader'` -ne 541 && \
  ${echo} 'restoration warning:  size of gnome-at-screenreader is not 541'
  fi
fi
# ============= gnome-start-ats ==============
if test -f 'gnome-start-ats' && test "$first_param" != -c; then
  ${echo} 'x -SKIPPING gnome-start-ats (file already exists)'
else
${echo} 'x - extracting gnome-start-ats (text)'
  sed 's/^X//' << 'SHAR_EOF' > 'gnome-start-ats' &&
#!/bin/sh
#
#	Copyright 2006 IBM Corp.
#
#	GPL v2.
#
X
ATKEY=/desktop/gnome/accessibility/session
ATS="screen-reader magnifier onscreen-keyboard"
X
run_at() {
X	cmdline=$(gconftool-2 --get $1/command)
X	if [ $? -ne 0 ]; then
X		exit $?
X	fi
X
X	start=$(gconftool-2 --get $1/start)
X	if [ $? -ne 0 ]; then
X		exit $?
X	fi
X
X	if [ ! -z "$cmdline" -a "$start" == "true" ]; then
X		echo $cmdline
X		#($cmdline &)
X	fi
}
X
run_other() {
X	n=$(gconftool-2 --get-list-size $ATKEY/other_ats)
X	if [ $? -ne 0 ]; then
X		exit $?
X	fi
X	
X	while [ $n -gt 0 ]; do
X		((n -= 1))
X		cmdline=$(gconftool-2 --get-list-element $ATKEY/other_ats $n)
X
X		echo $cmdline
X		#($cmdline &)
X	done
}
X
for A in $ATS; do
X	run_at $ATKEY/$A
done
X
run_other
X
#EOF
X
SHAR_EOF
  (set 20 06 10 20 09 01 06 'gnome-start-ats'; eval "$shar_touch") &&
  chmod 0775 'gnome-start-ats'
if test $? -ne 0
then ${echo} 'restore of gnome-start-ats failed'
fi
  if ${md5check}
  then (
       ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'gnome-start-ats: MD5 check failed'
       ) << SHAR_EOF
af4979595af4a8213674d469de290012  gnome-start-ats
SHAR_EOF
  else
test `LC_ALL=C wc -c < 'gnome-start-ats'` -ne 708 && \
  ${echo} 'restoration warning:  size of gnome-start-ats is not 708'
  fi
fi
if rm -fr ${lock_dir}
then ${echo} 'x - removed lock directory `'${lock_dir}\''.'
else ${echo} 'x - failed to remove lock directory `'${lock_dir}\''.'
  exit 1
fi
exit 0
