rc.d/00-fixup-environment.rc
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 11 Jun 2018 11:15:47 +0100
branchjv
changeset 1558 36927a04ace3
parent 1435 9a1f18933e40
permissions -rw-r--r--
Copyright updates

Smalltalk isStandAloneApp ifFalse:[

| userHome stxUserHome stxUserPackageDir |
userHome := Filename homeDirectory.
(userHome exists not or:[userHome isWritable not]) ifTrue:
	[('User home directory does not exists or is not writable ('
		,userHome name
			,'). Exitting') errorPrintCR.
	Smalltalk exit: 1].

stxUserHome := userHome / '.smalltalk'.

stxUserHome exists ifFalse:
	[stxUserHome makeDirectory.
	(stxUserHome / ('p_',OperatingSystem getLoginName,'.rc')) writeStream
		nextPutAll:'"User-specific startup script"';
		cr;
		close].


stxUserHome isDirectory ifFalse:
	[(stxUserHome name,' is not directory. Exitting')
		errorPrintCR.
	Smalltalk exit: 1].
]