parent
48fa712cb7
commit
b9e0b3265e
|
@ -46,6 +46,9 @@ func main () {
|
|||
}
|
||||
|
||||
dir := cli.Args[0]
|
||||
if abs, err := filepath.Abs(dir); err == nil {
|
||||
dir = abs
|
||||
}
|
||||
_, err := os.Stat(dir)
|
||||
if err != nil {
|
||||
err := os.Mkdir(dir, 0755)
|
||||
|
@ -79,6 +82,9 @@ func main () {
|
|||
}
|
||||
|
||||
dir := cli.Args[0]
|
||||
if abs, err := filepath.Abs(dir); err == nil {
|
||||
dir = abs
|
||||
}
|
||||
metadataPath := filepath.Join(dir, "fspl.mod")
|
||||
file, err := os.OpenFile(metadataPath, os.O_RDWR, 0644)
|
||||
handleErr(cli, err, 1)
|
||||
|
|
|
@ -40,7 +40,7 @@ func (this *Compiler) CompileUnit (address entity.Address) error {
|
|||
// if the output file is unspecified, generate a nickname from the
|
||||
// input address. if that doesn't work, default to "output"
|
||||
if this.Output == "" {
|
||||
nickname, ok := address.Nickname()
|
||||
nickname, ok := entity.Address(path).Nickname()
|
||||
if !ok { nickname = "output" }
|
||||
this.Output = this.Filetype.Extend(nickname)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue