Last active
July 17, 2019 17:42
-
-
Save samunders-core/75b20fea30c8df36082db4a3b1795ee5 to your computer and use it in GitHub Desktop.
"unprivileged" webOS TV SDK installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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/* | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
add to .profile: