Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Sub-scripts use first script's directory #1

Open
pikakid98 opened this issue May 9, 2024 · 1 comment
Open

Sub-scripts use first script's directory #1

pikakid98 opened this issue May 9, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@pikakid98
Copy link
Owner

When trying to run the compiler from in a sub-script.. Example, you're compiling one program which calls to another .compile file from within.. Doing this causes a weird issue where it'll try to use the first compile file's directory.. Which is unintended

@pikakid98 pikakid98 added the bug Something isn't working label May 14, 2024
@pikakid98
Copy link
Owner Author

pikakid98 commented Jul 6, 2024

Use this as a workaround for now

View the code
PUSHD "%CD%"
  
cd "{PATH}"
mkdir ".Cmpl8r"
mkdir "Output"
copy ".compile" ".Cmpl8r"
ren ".Cmpl8r\.compile" "[CompileTemp].bat"
call ".Cmpl8r\[CompileTemp].bat"
rmdir ".Cmpl8r" /S /Q
  
POPD
  
robocopy "{PATH}\Output" "Output" /MIR
  
rmdir "{PATH}\Output" /S /Q

Make sure to replace {PATH} with the actual path

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant