mirror of
https://github.com/mintty/wsltty.git
synced 2025-04-18 16:50:29 +01:00
chmod +x wslbridge-backend for all distros (#163)
This commit is contained in:
parent
2fb994604a
commit
3d4055a63b
@ -104,14 +104,8 @@ fi
|
|||||||
lxss="/HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Lxss"
|
lxss="/HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Lxss"
|
||||||
schema="/HKEY_CURRENT_USER/Software/Classes/Local Settings/Software/Microsoft/Windows/CurrentVersion/AppModel/SystemAppData"
|
schema="/HKEY_CURRENT_USER/Software/Classes/Local Settings/Software/Microsoft/Windows/CurrentVersion/AppModel/SystemAppData"
|
||||||
|
|
||||||
#(regtool list "$lxss" 2>/dev/null && echo || echo "No WSL packages registered" >&2) |
|
config () {
|
||||||
(
|
guid="$1"
|
||||||
if $alldistros
|
|
||||||
then regtool list "$lxss" 2>/dev/null
|
|
||||||
else true
|
|
||||||
fi && echo || echo "No WSL packages registered" >&2) |
|
|
||||||
while read guid
|
|
||||||
do
|
|
||||||
ok=false
|
ok=false
|
||||||
case $guid in
|
case $guid in
|
||||||
{*)
|
{*)
|
||||||
@ -151,7 +145,7 @@ do
|
|||||||
bridgeargs='--distro-guid "'"$guid"'" -t'
|
bridgeargs='--distro-guid "'"$guid"'" -t'
|
||||||
|
|
||||||
ok=true;;
|
ok=true;;
|
||||||
"") # WSL default installation
|
DefaultDistribution|"") # WSL default installation
|
||||||
distro=
|
distro=
|
||||||
name=WSL
|
name=WSL
|
||||||
icon="$installdir"'\wsl.ico'
|
icon="$installdir"'\wsl.ico'
|
||||||
@ -169,6 +163,13 @@ do
|
|||||||
target="$installdir"'\bin\mintty.exe'
|
target="$installdir"'\bin\mintty.exe'
|
||||||
bridgeargs=" " # deprecated
|
bridgeargs=" " # deprecated
|
||||||
|
|
||||||
|
if $ok && [ -n "$distro" ]
|
||||||
|
then # fix #163: backend missing +x with certain mount options
|
||||||
|
echo Setting +x wslbridge-backend for distro "'$distro'"
|
||||||
|
(cd "$LOCALAPPDATA/wsltty/bin"; wsl.exe -d "$distro" chmod +x wslbridge-backend)
|
||||||
|
# (cd "$LOCALAPPDATA/wsltty/bin"; "$SYSTEMROOT/System32/bash.exe" "$guid" -c chmod +x wslbridge-backend)
|
||||||
|
fi
|
||||||
|
|
||||||
if $ok && $config
|
if $ok && $config
|
||||||
then
|
then
|
||||||
export name target minttyargs bridgeargs icon
|
export name target minttyargs bridgeargs icon
|
||||||
@ -229,4 +230,14 @@ do
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
for guid in `
|
||||||
|
if $alldistros
|
||||||
|
then regtool list "$lxss" 2>/dev/null
|
||||||
|
else echo DefaultDistribution
|
||||||
|
fi || echo "No WSL packages registered" >&2
|
||||||
|
`
|
||||||
|
do config $guid
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user