install_test_fish (modules-5.1.1.tar.bz2) | : | install_test_fish (modules-5.2.0.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 78 | skipping to change at line 78 | |||
if [ $autoinit -eq 0 -a ! -x $initfile ] | if [ $autoinit -eq 0 -a ! -x $initfile ] | |||
echo_error "Cannot execute $initfile" | echo_error "Cannot execute $initfile" | |||
else if [ $autoinit -ne 0 -a ! -r $initfile ] | else if [ $autoinit -ne 0 -a ! -r $initfile ] | |||
echo_error "Cannot read $initfile" | echo_error "Cannot read $initfile" | |||
end | end | |||
# source module init file if first step of given mode | # source module init file if first step of given mode | |||
if [ "$mode" = 'top' -o "$mode" = 'sub' -o "$mode" = 'subsub' ] | if [ "$mode" = 'top' -o "$mode" = 'sub' -o "$mode" = 'subsub' ] | |||
if [ $autoinit -eq 0 ] | if [ $autoinit -eq 0 ] | |||
eval $initfile $shname autoinit | source - | eval \"$initfile\" $shname autoinit | source - | |||
else | else | |||
source $initfile | source $initfile | |||
end | end | |||
end | end | |||
# execute command list or perform recursive call | # execute command list or perform recursive call | |||
switch $mode | switch $mode | |||
case top launch | case top launch | |||
for cmd in (echo "$cmdlist" | tr ';' '\n') | for cmd in (echo "$cmdlist" | tr ';' '\n') | |||
eval $cmd | eval $cmd | |||
set ret (math $ret+$status) | set ret (math $ret+$status) | |||
end | end | |||
case sub sublaunch | case sub sublaunch | |||
eval $sh $shopts $progdir/install_test_$shkind $initfile launch $sh \ | eval $sh $shopts $progdir/install_test_$shkind \"$initfile\" launch $sh \ | |||
"(echo '$cmdlist' | sed 's|;|\\;|')"; | "(echo '$cmdlist' | sed 's|;|\\;|')"; | |||
set ret $status; | set ret $status; | |||
case subsub | case subsub | |||
eval $sh $shopts $progdir/install_test_$shkind $initfile sublaunch $sh \ | eval $sh $shopts $progdir/install_test_$shkind \"$initfile\" sublaunch $sh \ | |||
"(echo '$cmdlist' | sed 's|;|\\;|')"; | "(echo '$cmdlist' | sed 's|;|\\;|')"; | |||
set ret $status; | set ret $status; | |||
case '*' | case '*' | |||
echo_error "Unrecognized mode option. Valid mode are 'top', 'sub', 'subsub '" | echo_error "Unrecognized mode option. Valid mode are 'top', 'sub', 'subsub '" | |||
end | end | |||
# throw command exit code | # throw command exit code | |||
exit $ret | exit $ret | |||
# vim:set tabstop=3 shiftwidth=3 expandtab autoindent: | # vim:set tabstop=3 shiftwidth=3 expandtab autoindent: | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added |