`install-unx.sh` change the current working dir after execution
https://github.com/rstudio/tinytex/blob/18cc7c50bc52ae0b09baefe8257f68b1196245d6/tools/install-unx.sh#L21-L35
Aren't we missing a cd $PREVWD also at the end ?
I am running this on a new Linux environment, and after the installation I am in /tmp while I was not at the start.
@yihui Just wondering before doing the modification
It depends on how you run the script. If you run it via sh install-unx.sh, it won't matter (the change of working directory is only transient and will be restored after sh is done). If you run the script line by line interactively in the shell, yes, the change of working directory will be permanent, as you could expect.
That said, I guess adding cd $PREVWD to the end should be fine.
It depends on how you run the script. If you run it via sh install-unx.sh, it won't matter
Oh I see. I run it like that
. install-unx.sh
which execute in current environment and not another one.