Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] remove shopt&alias to make it work on powershell #131

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pvgenuchten
Copy link

@pvgenuchten pvgenuchten commented Jun 21, 2023

PR to facilitate discussion on this topic

docker-compose was removed >1 year ago, i think we can assume all are migrated by now?

removing shopt and alias because it is not supported on powershell/windows

todo: update docs for windows:
syntax: bash geopython-workshop-ctl.sh start|stop|url|update

  • works on powershell (windows+docker desktop)
  • works on ubuntu (WSL)

@pvgenuchten pvgenuchten requested a review from justb4 June 21, 2023 09:58
@tomkralidis tomkralidis changed the title remove shopt&alias to make it work on powershell [WIP] remove shopt&alias to make it work on powershell Jun 21, 2023
@pvgenuchten
Copy link
Author

@tomkralidis, updated docs for powershell

Copy link
Member

@justb4 justb4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, looks like these changes remove the alias and assume the command is docker compose. This will break for students having docker-compose installed (like me).

Best option is to make the script cross-platform. The $IsWindows var e.g.
and https://redmondmag.com/articles/2020/08/18/cross-platform-powershell-scripts.aspx

@justb4 justb4 added the enhancement New feature or request label Jun 21, 2023
@justb4 justb4 added this to the FOSS4G 2023 milestone Jun 21, 2023
@pvgenuchten
Copy link
Author

pvgenuchten commented Jun 21, 2023

ah, good to know people are still using docker-compose

alternative would be to duplicate the script and rename to _ps.sh

@justb4 PR updated

syntax:  bash geopython-workshop-ctl.sh start
docker compose rm --force
elif [ $1 == "url" ]; then
# try to open the Jupyter Notebook in Browser
platform="$(uname | tr '[:upper:]' '[:lower:]')"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this still required? I guess the openapp="cmd /c start" is the command in PS here.

@justb4
Copy link
Member

justb4 commented Jun 22, 2023

I cannot test this, but seems useful. I wonder if the uname stuff even works. I have no idea how Powershell relates to WSL and Docker install. I have the feeling we would not need a separate Bash script with some smart 'sniffing' like the $Windows var and uname command, branching in the original script. It may be confusing even, two scripts with almost identical names.

@tomkralidis tomkralidis removed this from the FOSS4G 2023 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants