MYSHELL XCOMM XDIR.CSH -- Startup xdir version of the ximtool program XCOMM XCOMM Eric Mandel 12/29/93 XCOMM set noglob XCOMM initialize SAORD variables if ( $?SAORD_ROOT == 0 ) then setenv SAORD_ROOT HERE endif if ( -e ${SAORD_ROOT}/xpa1 ) then setenv XPA_VERSION 1 else setenv XPA_VERSION 2 endif if ( $?SAORD_BIN == 0 ) then setenv SAORD_BIN ${SAORD_ROOT}/bin.`${SAORD_ROOT}/getarch` endif if ( $?SAORD_TMPDIR == 0 ) then setenv SAORD_TMPDIR /tmp endif setenv SAORD_VERSION "`cat ${SAORD_ROOT}/VERSION`" XCOMM end of SAORD initialization XCOMM This initialization variable was used for older X programs if ( $?SAORD_GUIFLAVOR == 0 ) setenv SAORD_GUIFLAVOR DEFAULT XCOMM make sure we have the program if ( $?XDIREXE == 0 ) then setenv XDIREXE ${SAORD_BIN}/XDir else echo "Using alternate XDIR program: ${XDIREXE}" endif if (! -e $XDIREXE) then echo "$XDIREXE program could not be found ... exiting ..." exit(1) endif if ( $?XDIR == 0 ) setenv XDIR XDir if ( $?XDIR_TITLE == 0 ) setenv XDIR_TITLE XDir if ( $?XDIR_ACTIONS == 0 ) setenv XDIR_ACTIONS ${SAORD_BIN}/xdir.cmds if ( $?XDIR_APPDEFS == 0 ) setenv XDIR_APPDEFS ${SAORD_ROOT}/app-defaults if ( $?XPA_TARGET == 0 ) setenv XPA_TARGET SAOtng set DIR = `pwd` set FILTER = '*' set XRM = "" set n = 1 while ("$n" <= "$#argv") if ( "$argv[$n]" == "-echo" ) set echo if ( "$argv[$n]" == "-display" ) then @ n++ setenv DISPLAY "$argv[$n]" endif if ( "$argv[$n]" == "-dir" ) then @ n++ set DIR = "$argv[$n]" endif if ( "$argv[$n]" == "-filter" ) then @ n++ set FILTER = "$argv[$n]" endif if ( "$argv[$n]" == "-actions" ) then @ n++ setenv XDIR_ACTIONS "${XDIR_ACTIONS} $argv[$n]" endif if ( "$argv[$n]" == "-title" ) then @ n++ setenv XDIR "$argv[$n]" setenv XDIR_TITLE "$XDIR" endif if ( "$argv[$n]" == "-b" || "$argv[$n]" == "-beautiful" ) then setenv SAORD_GUIFLAVOR BEAUTIFUL endif if ( "$argv[$n]" == "-bland" ) then setenv SAORD_GUIFLAVOR BLAND endif if ( "$argv[$n]" == "-xrm" ) then @ n++ set XRM = "${XRM} -xrm $argv[$n]" endif @ n++ end XCOMM look for xpa1 name conflict if ( "$XPA_VERSION" == "1" ) then if ( `${SAORD_BIN}/xpaaccess ${XDIR_TITLE}` == "yes" ) then echo "You can run only one XDir with the title '${XDIR_TITLE}' on a given machine." echo "Please use -title to run multiple XDir's on the same machine ..." exit(1) endif endif XCOMM Set up application defaults directory if ($?XFILESEARCHPATH == 0) then setenv XFILESEARCHPATH "${XDIR_APPDEFS}/%N%S" else setenv XFILESEARCHPATH "${XFILESEARCHPATH}:${XDIR_APPDEFS}/%N%S" endif if ($?XAPPLRESDIR == 0) then setenv XAPPLRESDIR "${XDIR_APPDEFS}" else if ( ! -e ${XAPPLRESDIR}/XDirectory ) then setenv XAPPLRESDIR "${XDIR_APPDEFS}" endif endif ${XDIREXE} \ -title ${XDIR_TITLE} \ -xrm "*iconName:${XDIR_TITLE}" \ -xrm "XDirectory*dir:${DIR}" \ -xrm "XDirectory*filter:${FILTER}" \ -xrm "XDirectory*showcd:True" \ -xrm "XDirectory*help:${SAORD_ROOT}/XDir/XDir.hlp" \ -xrm "XDirectory*window:-" \ -xrm "XDirectory*fmgr:${XDIR_ACTIONS}" \ ${XRM}