#!/bin/sh
 
 # g_good
 # ======

 # This file is part of Gerolf Markup Shredder,
 # written by G. D. Brettschneider (1999-2006).
 
 GMSdateG_GOOD=20060927
 
 # Prologue: # ================================================================
 
 # Not running:
 
 if [ "$GMS_SHELL" = "" ]; then
   echo "This is Gerolf Markup Shredder (g_good)."
   exit
 fi 
 
 # Debug: ---------------------------------------------------------------------

 if [ "$GMS_DEBUG" = "X" -o "$GMS_DEBUG" = "Y" ]; then
   source "$GMS_SHELL/l_banner" -debug g_good $1 $2 $3 $4
 elif  [ "$GMS_DEBUG" = "Z" ]; then
   echo " g_good ($1) ($2) ($3) ($4) ($5) ($6) ($7) ($8) ($9)" >> "$Z"
 fi
 
 # Chapters: ==================================================================
 
 # Not defined:
 
 if [ "$1" = "" ]; then source "$GMS_SHELL/l_banner" -no_action g_good
   
 # Resize: --------------------------------------------------------------------
   
 elif [ $1 = -resize ]; then
   export REPLY_OFFSET=3
   export REPLY_SIZE=44
   export REPLY_ITEMS=1
   
 # Build: ---------------------------------------------------------------------
 
 elif [ $1 = -build ]; then
   source "$GMS_SHELL/l_banner" -lower -first called_by g_good -build
   source "$GMS_SHELL/l_banner" -upper -last called_by g_good -build
   source "$GMS_SHELL/g_good" -resize called_by g_good -build
   source "$GMS_SHELL/l_box" -build called_by g_good -build
   source "$GMS_SHELL/l_good" -build called_by g_good -build
   export GMS_HOT=Q
   source "$GMS_SHELL/l_good" -update Q Q
   export REPLY_MODULE=g_good
   export REPLY_ACTION=-remove
   export GMS_RECEIVE=1
   
 # Remove: --------------------------------------------------------------------
 
 elif [ $1 = -remove ]; then 
   source "$GMS_SHELL/g_good" -resize  called_by g_good -remove
   source "$GMS_SHELL/l_good" -update - Q
   source "$GMS_SHELL/g_menu" -resize called_by g_good -remove
   source "$GMS_SHELL/g_menu" -remove called_by g_good -remove
   source "$GMS_SHELL/g_good" -resize called_by g_good -remove
   source "$GMS_SHELL/l_box" -remove called_by g_good -remove
   source "$GMS_SHELL/l_desk" -remove called_by g_good -remove
   setterm -clear
   echo  -n " Please support the author of Markup Shredder   -"
   echo "   w w w . G e r o l f . o r g"
   cat "$GMS_SETTING/desktop.scn"
   source gms -q called_by g_good -remove
   export GMS_TEXTMODE=
   export GMS_BREAK=1
   
 # Not found: -----------------------------------------------------------------
 
 else
   source "$GMS_SHELL/l_banner" -no_action g_good $1   
 fi
