Envy

 view release on metacpan or  search on metacpan

envy.IN  view on Meta::CPAN

    for ($db->warnings) { print }
    exit 1
	if $failed;
    $db->write_log if !$is_showing;
    my $old = select STDOUT if !$is_showing;
    for my $z ($db->to_sync()) {
	my ($k,$v) = @$z;
	# hope that single-quoting is enough XXX
	if (defined $v) {
	    if ($is_csh) {
		print "setenv $k '$v';\n";
	    } else {
		print "$k='$v'; export $k;\n";
	    }
	} else {
	    if ($is_csh) {
		print "unsetenv $k;\n";
	    } else {
		print "unset $k;\n";
	    }
	}
    }
    select $old if $old;
}

sub Huh {
    my ($why) = @_;

etc/login/dot.dtprofile  view on Meta::CPAN

###     ...
###	  
###   example for csh
###
###     if ( ! ${?DT} ) then
###       #
###       # commands and environment variables not appropriate for desktop
###       #
###       stty ...
###       tset ...
###       setenv DISPLAY mydisplay:0
###       ...
###     endif
###
###     #
###     # environment variables common to both desktop and non-desktop
###     #
###     setenv PATH $HOME/bin:$PATH
###     setenv MYVAR value
###     ...
###  
###   Errors in .dtprofile or .profile (.login) may prevent a successful
###   login. If after you login, your session startup terminates and you
###   are presented with the login screen, this might be the cause. If this
###   happens, select the Options->Sessions->Failsafe Session item on the
###   login screen, login and correct the error. The $HOME/.dt/startlog and
###   $HOME/.dt/errorlog files may be helpful in identifying errors.
###
##############################################################################

login.IN  view on Meta::CPAN

set ENVY_CONTEXT=STARTUP
set ENVY=#ENVY.PL#
test -x $ENVY || echo Envy not found at ${ENVY}: PANIC

$ENVY -csh load $startup > /tmp/mod.$$
source /tmp/mod.$$
if ($?debug) cat /tmp/mod.$$
/bin/rm /tmp/mod.$$

if (! $?ETOP) then
  setenv ETOP #ETOP#
  echo "Environment variable ETOP not set in '$startup'"
  echo "Defaulting to $ETOP..."
endif

alias safe_symlink 'test -f \!:2 && test \! -h \!:2 && mv \!:2 \!:2.bak.$$; /bin/rm -f \!:2 ; ln -s \!:1 \!:2'

#SAFE_SYMLINK#

test -d $HOME/.custom || mkdir $HOME/.custom

set_defaults.PL  view on Meta::CPAN

    $How{$k} = $Envy::DefaultConf::How{$k} if !defined $How{$k};
}

sub do_init_env {
    my ($file) = @_;
    my $env0 = $How{env0};
    my $str='';
    if ($file eq 'login.IN') {
	for my $k (sort keys %$env0) {
	    my $v=$$env0{$k};
	    $str .= "setenv $k $v\n";
	}
    } else {
	for my $k (sort keys %$env0) {
	    my $v=$$env0{$k};
	    $str .= "$k=$v; export $k\n";
	}
    }
    $str;
}



( run in 0.624 second using v1.01-cache-2.11-cpan-3989ada0592 )