Class: CmdRm
- Inherits:
-
Rumodule
show all
- Defined in:
- bin/rumodule
Overview
Direct Known Subclasses
CmdSrm
Constant Summary
Constant Summary
Constants included
from Utility
Utility::LOADED, Utility::MODULEDIRS, Utility::RUMODULE_PUSH, Utility::SUBLOADED, Utility::SYSLOADED
RumoduleCommon::SHELL
Instance Method Summary
(collapse)
Methods inherited from Rumodule
#_is_loaded, #_output, flush, #getenvar, run
Methods included from Utility
#abort, #all_loaded, #commonHelp, #error, #findModule, #help, #loadModule, #loaded, #registerModule, #sys_loaded, #unregisterModule, #usage, #warning
#home
Instance Method Details
- (Object) action(mods, list = :normal)
929
930
931
932
933
934
935
936
937
|
# File 'bin/rumodule', line 929
def action( mods, list = :normal )
mods.each do |mod|
mod_path = findModule( mod )
if _is_loaded( mod_path )
loaded_mod = loadModule( mod_path )
unregisterModule( loaded_mod, list )
end
end
end
|
- (Object) add(mod)
991
992
993
|
# File 'bin/rumodule', line 991
def add( mod )
action( [ mod ], :sub )
end
|
- (Object) append_path(var, value)
955
956
957
|
# File 'bin/rumodule', line 955
def append_path( var, value )
getenvar( var ).remove_path( value )
end
|
- (Object) conflict(mod)
983
984
985
|
# File 'bin/rumodule', line 983
def conflict( mod )
true
end
|
- (Object) is_loaded(mod)
987
988
989
|
# File 'bin/rumodule', line 987
def is_loaded( mod )
true
end
|
- (Object) prepend_path(var, value)
959
960
961
|
# File 'bin/rumodule', line 959
def prepend_path( var, value )
getenvar( var ).remove_path( value )
end
|
- (Object) prereq(mod)
979
980
981
|
# File 'bin/rumodule', line 979
def prereq( mod )
true
end
|
- (Object) pushenv(var, value)
967
968
969
970
971
972
973
974
975
976
977
|
# File 'bin/rumodule', line 967
def pushenv( var, value )
bup = "#{RUMODULE_PUSH}_#{var}"
if EnvVar.exist?( bup )
v = getenvar( bup )
getenvar( var, true ).set( v.value[0] )
v.value.shift
end
end
|
- (Object) remove_path(var, value)
963
964
965
|
# File 'bin/rumodule', line 963
def remove_path( var, value )
getenvar( var, true ).prepend_path( value )
end
|
- (Object) setenv(var, value)
943
944
945
946
947
|
# File 'bin/rumodule', line 943
def setenv( var, value )
if v = getenvar( var )
v.unset
end
end
|
- (Object) unsetenv(var, value = nil)
949
950
951
952
953
|
# File 'bin/rumodule', line 949
def unsetenv( var, value = nil )
if value
getenvar( var, true ).set( value )
end
end
|