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

making the shell scripts usable for windows powershell #3

Closed
joergi opened this issue Sep 28, 2017 · 15 comments
Closed

making the shell scripts usable for windows powershell #3

joergi opened this issue Sep 28, 2017 · 15 comments
Assignees
Labels
enhancement Hacktoberfest Hacktoberfest https://hacktoberfest.digitalocean.com/ help wanted

Comments

@joergi
Copy link
Owner

joergi commented Sep 28, 2017

At this time, the scripts are only working on Linux and OSX machines.

With Windows 8 and 10, Microsoft has introduced the Powershell.

So there is a good opportunity to bring the MagPiDownloader to the Windows system too.

I started to do this by myself, but it was not that easy.
I found on StackOverflow, that it should work like this:

$client = new-object System.Net.WebClient
$client.DownloadFile("https://www.raspberrypi.org/magpi-issues/Essentials_Games_v1.pdf","special_issues/")

But maybe there was something wrong, or I started it wrong.

That's why I ask here for help.
Thanks a lot.

@joergi joergi added enhancement help wanted Hacktoberfest Hacktoberfest https://hacktoberfest.digitalocean.com/ labels Sep 28, 2017
@rubemlrm
Copy link
Contributor

I think that i can help you doing that.during the weekend i will try handle this issue

@joergi
Copy link
Owner Author

joergi commented Sep 28, 2017

would be lovely! should I assign it to you?

@rdtheriault
Copy link

You just need to specify the path better. This worked for me

$client = new-object System.Net.WebClient
$client.DownloadFile("https://www.raspberrypi.org/magpi-issues/MagPi62.pdf","C:/users/test.pdf")

@joergi
Copy link
Owner Author

joergi commented Sep 28, 2017

is there one way to use a relative path @rdtheriault ?

@rdtheriault
Copy link

rdtheriault commented Sep 28, 2017

Yes, you could do something like this to the user folder

$client.DownloadFile("https://www.raspberrypi.org/magpi-issues/MagPi62.pdf","$env:USERPROFILE/test.pdf")

More can be found here

@joergi
Copy link
Owner Author

joergi commented Sep 29, 2017

ok, I tested it yesterday, but my shell was restricted. So first I have to find out, how to unlock it.
... I know why I switched more than 15 years ago to Linux

@rubemlrm
Copy link
Contributor

rubemlrm commented Sep 29, 2017

restricted how ? what error did you get . I've tested this on my laptop and run without problems. we need to update travis to . if you want test all the alternatives, because you now rely on the bash command to execute the scripts, but on the Powershell you can't run with bash.

Besides this i think that can reduce the number of files , since the only thing that change between them is the language and language folders , its possible to change this to be more simple to use.

Btw you can assign this to me if you want.

@joergi
Copy link
Owner Author

joergi commented Sep 29, 2017

I know that I can make the language as a parameter. But I want to keep it as simple as possible for all the languages, that's why I have separated files.

Can you try to assign by yourself? Looks like, I can't do this. thanks

That's what I got in my Powershell
mmolfpfeljhgcjem
code in the file looks like this:

$client = new-object System.Net.WebClient
$client.DownloadFile("https://www.raspberrypi.org/magpi-issues/MagPi62.pdf","C:\Users\test.pdf")

(i also tried it yesterday night with path to C:/Users/test.pdf )

@rubemlrm
Copy link
Contributor

rubemlrm commented Sep 29, 2017

To fix that error:

Start Windows PowerShell with the "Run as Administrator" option. Only members of the Administrators group on the computer can change the execution policy.
Enable running unsigned scripts by entering:
set-executionpolicy remotesigned

Relative to the assign , only the owner of repo can do that.

@joergi joergi assigned joergi and rubemlrm and unassigned joergi Sep 29, 2017
@joergi
Copy link
Owner Author

joergi commented Sep 30, 2017

Now the assignment works.
I will not be able to have a look before Wednesday to it.
But thanks a lot for helping 👍

@rubemlrm
Copy link
Contributor

rubemlrm commented Oct 2, 2017

I'm working on this =) , tomorrow i will do a pull request with the changes.

@joergi
Copy link
Owner Author

joergi commented Oct 3, 2017

Great, looking forward for it.

@joergi
Copy link
Owner Author

joergi commented Oct 3, 2017

By the way, this issue is part of the https://hacktoberfest.digitalocean.com so be sure to have a look to it - maybe you will get a free shirt!

@joergi joergi added this to the running scripts on windows milestone Oct 5, 2017
@joergi
Copy link
Owner Author

joergi commented Oct 5, 2017

perfect job done by @rubemlrm !!!
Thanks a lot for the work man!

@rubemlrm
Copy link
Contributor

rubemlrm commented Oct 5, 2017

this issue is relative to #5

rubemlrm added a commit that referenced this issue Jul 1, 2020
…super-linter-v3.1.1

Bump github/super-linter from v3.1.0 to v3.1.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Hacktoberfest Hacktoberfest https://hacktoberfest.digitalocean.com/ help wanted
Projects
None yet
Development

No branches or pull requests

3 participants