Skip to content

Instantly share code, notes, and snippets.

@samunders-core
Last active July 17, 2019 17:42
Show Gist options
  • Save samunders-core/75b20fea30c8df36082db4a3b1795ee5 to your computer and use it in GitHub Desktop.
Save samunders-core/75b20fea30c8df36082db4a3b1795ee5 to your computer and use it in GitHub Desktop.
"unprivileged" webOS TV SDK installation
#!/bin/sh
SDK_DIR=$HOME/webOS_TV_SDK
# this nonsense is the reason for sudo in webOS TV SDK installation scripts
sudo ln -s $SDK_DIR /home/.lgsdkTvregistery
patch_sudo() {
sed -i -re '0,/exit [0-9]/s/exit [0-9]//' -e '0,/sudo nohup/s/sudo nohup//' "$@"
}
patch_sudo ./installer_linux64
# remember to change installation path to $HOME, installer will append /webOS_TV_SDK
./installer_linux64 && {
sed -i -re 's|\blocation=""|location="'$SDK_DIR'"|' $SDK_DIR/.webosTVregistery.xml
sed -i -re 's|\bcomponentManagerVersion=""|componentManagerVersion="ComponentManager-0.0.0-j"|' $SDK_DIR/.webosTVregistery.xml
patch_sudo $SDK_DIR/ComponentManager/componentmanager_linux64
# whole SDK_DIR tree will be `chmod -R 777`-ed anyway after ComponentManager updates itself :-(
chmod +x $SDK_DIR/ComponentManager/componentmanager_linux64 $SDK_DIR/Resources/Jre/bin/*
}
@samunders-core
Copy link
Author

samunders-core commented Jul 17, 2019

add to .profile:

export LG_WEBOS_TV_SDK_HOME="$HOME/webOS_TV_SDK"
export WEBOS_CLI_TV="$LG_WEBOS_TV_SDK_HOME/CLI/bin"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment