winapps-org / winapps

The winapps main project, forked from https://github.com/Fmstrat/winapps/
Other
998 stars 45 forks source link

Fixing installer.sh #108

Closed Alchemi1963 closed 3 months ago

Alchemi1963 commented 4 months ago

Rewrote the printf lines to work nice with writing the batch script. Rewrote the apps scanner to take relative paths (with ls) for more consistent results across Added checks for emtpy vars so bin aren't accidentally written to or deleted.

CLAassistant commented 4 months ago

CLA assistant check
All committers have signed the CLA.

oskardotglobal commented 4 months ago

I will just test this on my machine and report back

jrevillard commented 4 months ago

I will just test this on my machine and report back

I have another fix also... I did not made any MR but here is my diff: installer.PATCH

It's still not perfect... I have the same problem than #111 and #110 (this one I simply removed the check as you see)

oskardotglobal commented 4 months ago

I have a fix for the printf problem, gonna commit that rq

Alchemi1963 commented 4 months ago

I will just test this on my machine and report back

I have another fix also... I did not made any MR but here is my diff: installer.PATCH

It's still not perfect... I have the same problem than #111 and #110 (this one I simply removed the check as you see)

I see you did mostly the same things and had the same issue as I in #109 :) I did that too, but didn't commit it as the devs specifically made a commit a while back about preferring system icons instead (idk why but ok)

Alchemi1963 commented 4 months ago

I have a fix for the printf problem, gonna commit that rq

Out of curiosity, what is that fix?

oskardotglobal commented 4 months ago

@Alchemi1963

If you run a printf like

printf "%s\n" 'powershell.exe -ExecutionPolicy Bypass -File \\tsclient\home\.local\share\\winapps\ExtractPrograms.ps1 > \\tsclient\home\.local\share\winapps\detected'

with the argument containing backslashes in single quotes and have a first argument in double quotes then the backslashes will be interpreted literally

oskardotglobal commented 4 months ago

No more double or triple escaping

Alchemi1963 commented 4 months ago

@Alchemi1963

If you run a printf like

printf "%s\n" 'powershell.exe -ExecutionPolicy Bypass -File \\tsclient\home\.local\share\\winapps\ExtractPrograms.ps1 > \\tsclient\home\.local\share\winapps\detected'

with the argument containing backslashes in single quotes and have a first argument in double quotes then the backslashes will be interpreted literally

Oh yeah, that is much cleaner

DesNZ commented 4 months ago

This PR allows allows installer.sh to complete successfully for me. No more RDP connection error message.

LDprg commented 4 months ago

pre-commit.ci autofix

LDprg commented 4 months ago

We only need to fix shellcheck, before merging.