Created
January 3, 2018 10:18
-
-
Save marmistrz/78c2b7ea9b78f102563febef011a48ad to your computer and use it in GitHub Desktop.
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
post_install() { | |
_VERSION=1710 | |
_EXECUTABLE=SailfishOSSDK-Beta-${_VERSION}-Qt5-linux-64-offline.run | |
_PATH=/usr/share/sailfishos-sdk-bin | |
_USER=`cat /usr/share/sailfishos-sdk-bin/username.txt` | |
chown ${_USER}:users ${_PATH}/${_EXECUTABLE} | |
sudo -u ${_USER} chmod +x ${_PATH}/${_EXECUTABLE} | |
mkdir /opt/SailfishOS | |
chown ${_USER}:users -R /opt/SailfishOS | |
sudo -u ${_USER} ${_PATH}/${_EXECUTABLE} --verbose --script ${_PATH}/install_rules.js -platform minimal --logging-rules | |
} | |
pre_upgrade() { | |
pre_remove $2 | |
} | |
post_upgrade() { | |
post_install $1 | |
} | |
pre_remove() { | |
_USER=`cat /usr/share/sailfishos-sdk-bin/username.txt` | |
/opt/SailfishOS/SDK/SDKMaintenanceTool --verbose --script /usr/share/sailfishos-sdk-bin/install_rules.js -platform minimal --logging-rules | |
rm -rf /opt/SailfishOS | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment