ninjaaron / administrative-scripting-with-julia

Guide for writing shell scripts in Julia
162 stars 12 forks source link

CLI Arguments cp.jl file not working #1

Closed korbinian90 closed 5 years ago

korbinian90 commented 5 years ago

For "CLI Arguments", don't you need a shebang in the beginning of the cp.jl file? I added #!/usr/bin/env julia as a first line, using chmod u+x on it, than it could run it.

However, it failed with: ERROR: LoadError: ArgumentError: 'somefolder' exists. force=true is required to remove 'somefolder' before copying.

I solved it by using the full path for cp: cp(src, joinpath(dest, basename(src)))

ninjaaron commented 5 years ago

Thanks for opening the issue. I'll look into it further. May I ask what platform you're on?

korbinian90 commented 5 years ago

Ubuntu 16.04 with Julia 1.0.1