#!/bin/sh

# bxadd
# Copyright (C) 2025 Joseph Rosevear, San Diego CA, USA.

# This file is part of a distribution SAM.

# SAM is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your
# option) any later version.

# SAM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.

# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.



# Joseph Rosevear before 200516 I wrote this script.

# Joseph Rosevear 200516 I changed the invocation of the shell.  Before
# it opened xterm.  Now it opens SAM using $place/begin.

# Joseph Rosevear 230502 I messed with this script and put it back to
# right.  That is why there is the comment that begins:
#
#    ". $place/tryit/tryit5"

# Joseph Rosevear 230503 I changed this script to use B.  To do that I
# replaced this:

#    $place/begin 

# with:

#    $place/B "`/$place/set2`; love; sam_bye_command=exit"

# Joseph Rosevear 230504 I changed this script to use begin..  To do
# that I replaced this:

#    $place/B "`/$place/set2`; love; sam_bye_command=exit"

# with:

#    $place/begin

# Joseph Rosevear 230522 I changed the line that invokes begin.  It
# was:

#    DISPLAY=:$1 export sh_flag=sh; sam_task=`basename $0` sam_iconic=true \
#    $place/begin

# now:

#    DISPLAY=:$1 sam_task=`basename $0` sam_iconic=true $place/begin

# Joseph Rosevear 230606 I changed the line that invokdes begin.  I
# replaced "sam_iconic=true" with "xterm_opt=-iconic".

# Joseph Rosevear 230620 I reduced the sleep from 5 seconds to 1
# second.



place=`dirname $0`

xauth add :$1 . `cat /tmp/xauth`
DISPLAY=:$1 sam_task=`basename $0` xterm_opt=-iconic $place/begin

echo sleeping for 1 second
sleep 1
