mirror of
https://github.com/elliotnunn/BuildCubeE.git
synced 2026-04-24 09:16:41 +00:00
Getting somewhere
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
# SetDirectory - set the default directory
|
||||
#
|
||||
# Usage:
|
||||
# SetDirectory directory
|
||||
#
|
||||
# SetDirectory sets the default directory and adds the new default
|
||||
# directory to the Directory menu if it is not already present.
|
||||
#
|
||||
#
|
||||
# Copyright Apple Computer, Inc. 1987 - 1990
|
||||
# All rights reserved.
|
||||
|
||||
Set Exit 0
|
||||
If {#} != 1 OR "{1}" == ""
|
||||
Echo "### {0} - A directory must be specified." > Dev:StdErr
|
||||
Echo "# Usage - {0} directory" > Dev:StdErr
|
||||
Exit 1
|
||||
Else
|
||||
Directory "{1}"
|
||||
If {Status} != 0
|
||||
Exit 2
|
||||
End
|
||||
Set directory `Directory`
|
||||
|
||||
if !`Evaluate "{directory}" =~ /?«0,64»/` # longer that 64 bytes?
|
||||
Unset ®1 ; Unset ®2
|
||||
(Evaluate "{directory}" =~ /([¬':']*)®1≈':'([¬':']+)®2':'/ ) ∑ dev:null
|
||||
Set menuname "{®1}"':…:'"{®2}"
|
||||
else
|
||||
Set menuname "{directory}"
|
||||
end
|
||||
|
||||
AddMenu Directory "{menuname}" ∂
|
||||
'Directory "'"{directory}"'" > "{ShellDirectory}"MPW.Errors ≥ Dev:StdOut ∂
|
||||
|| Alert < "{ShellDirectory}"MPW.Errors'
|
||||
End
|
||||
Reference in New Issue
Block a user